Bug 1224237 - Remove the !baseURL check from ServiceWorkerContainer::Register;r=bkelly a=ritu
authorEddy Bruel <ejpbruel@mozilla.com>
Fri, 13 Nov 2015 10:48:49 +0100
changeset 305554 b2f5153b4455aa8954e2446977195993c544b697
parent 305553 17adb01573b33188fdcf4290405dbbbf0e815e8d
child 305555 a8babe14e557fdf216d9c65721b035efc2de5fba
push id1001
push userraliiev@mozilla.com
push dateMon, 18 Jan 2016 19:06:03 +0000
treeherdermozilla-release@8b89261f3ac4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbkelly, ritu
bugs1224237
milestone44.0a2
Bug 1224237 - Remove the !baseURL check from ServiceWorkerContainer::Register;r=bkelly a=ritu
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;
   }