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 272449 bc555a3298d3c8d93a670fddff06e31b8a5f2a06
parent 272448 3654304318e11e2e0ef8775678ae22e314623e6e
child 272450 c308db03b24298978ae3f3adf6c5f096c7d2ed7c
push id29674
push userphilringnalda@gmail.com
push dateSat, 14 Nov 2015 21:22:32 +0000
treeherdermozilla-central@51fa3e0d4f7b [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;
   }