Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
index fa2e56abbbcb5d4a88df622dca4f2ff30eac51fb..cf94bd521093010a71a84420d370e05d490051f3 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
@@ -105,16 +105,7 @@ ScriptPromise ServiceWorkerRegistration::unregister(ScriptState* scriptState) |
return promise; |
} |
- RefPtr<SecurityOrigin> documentOrigin = scriptState->executionContext()->securityOrigin(); |
- KURL scopeURL = scriptState->executionContext()->completeURL(scope()); |
- scopeURL.removeFragmentIdentifier(); |
- if (!scope().isEmpty() && !documentOrigin->canRequest(scopeURL)) { |
- RefPtr<SecurityOrigin> scopeOrigin = SecurityOrigin::create(scopeURL); |
- resolver->reject(DOMException::create(SecurityError, "Failed to unregister a ServiceWorkerRegistration: The origin of the registration's scope ('" + scopeOrigin->toString() + "') does not match the current origin ('" + documentOrigin->toString() + "').")); |
- return promise; |
- } |
- |
- m_provider->unregisterServiceWorker(scopeURL, new CallbackPromiseAdapter<bool, ServiceWorkerError>(resolver)); |
+ m_outerRegistration->unregister(m_provider, new CallbackPromiseAdapter<bool, ServiceWorkerError>(resolver)); |
return promise; |
} |