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 308720 bc555a3298d3c8d93a670fddff06e31b8a5f2a06
parent 308719 3654304318e11e2e0ef8775678ae22e314623e6e
child 308721 c308db03b24298978ae3f3adf6c5f096c7d2ed7c
push id7515
push usermjzffr@gmail.com
push dateFri, 13 Nov 2015 14:42:42 +0000
reviewersbkelly
bugs1224237
milestone45.0a1
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;
   }