Bug 1224237 - Remove the !baseURL check from ServiceWorkerContainer::Register;r=bkelly
authorEddy Bruel <ejpbruel@mozilla.com>
Fri, 13 Nov 2015 10:48:49 +0100
changeset 272382 bc555a3298d3c8d93a670fddff06e31b8a5f2a06
parent 272381 3654304318e11e2e0ef8775678ae22e314623e6e
child 272383 c308db03b24298978ae3f3adf6c5f096c7d2ed7c
push id67946
push userejpbruel@mozilla.com
push dateFri, 13 Nov 2015 09:49:07 +0000
treeherdermozilla-inbound@bc555a3298d3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly
bugs1224237
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1224237 - Remove the !baseURL check from ServiceWorkerContainer::Register;r=bkelly
dom/workers/ServiceWorkerContainer.cpp
--- a/dom/workers/ServiceWorkerContainer.cpp
+++ b/dom/workers/ServiceWorkerContainer.cpp
@@ -153,22 +153,16 @@ ServiceWorkerContainer::Register(const n
     nsCOMPtr<nsPIDOMWindow> window = GetOwner();
     nsCOMPtr<nsPIDOMWindow> outerWindow;
     if (window && (outerWindow = window->GetOuterWindow()) &&
         outerWindow->GetServiceWorkersTestingEnabled()) {
       baseURI = window->GetDocBaseURI();
     }
   }
 
-
-  if (!baseURI) {
-    aRv.Throw(NS_ERROR_DOM_INVALID_STATE_ERR);
-    return nullptr;
-  }
-
   nsresult rv;
   nsCOMPtr<nsIURI> scriptURI;
   rv = NS_NewURI(getter_AddRefs(scriptURI), aScriptURL, nullptr, baseURI);
   if (NS_WARN_IF(NS_FAILED(rv))) {
     aRv.ThrowTypeError<MSG_INVALID_URL>(&aScriptURL);
     return nullptr;
   }