Index: Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
diff --git a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
index 999a62087e8ec9937a1d6ab6e218ad57691abf82..7c701b4998cbf5cca150e04625530d6aebd0c36b 100644 |
--- a/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
+++ b/Source/modules/serviceworkers/ServiceWorkerRegistration.cpp |
@@ -86,18 +86,13 @@ |
return m_outerRegistration->scope().string(); |
} |
-ScriptPromise ServiceWorkerRegistration::update(ScriptState* scriptState) |
+void ServiceWorkerRegistration::update(ScriptState* scriptState, ExceptionState& exceptionState) |
{ |
- RefPtrWillBeRawPtr<ScriptPromiseResolver> resolver = ScriptPromiseResolver::create(scriptState); |
- ScriptPromise promise = resolver->promise(); |
- |
if (!m_provider) { |
- resolver->reject(DOMException::create(InvalidStateError, "Failed to update a ServiceWorkerRegistration: No associated provider is available.")); |
- return promise; |
+ exceptionState.throwDOMException(InvalidStateError, "Failed to update a ServiceWorkerRegistration: No associated provider is available."); |
+ return; |
} |
- |
- m_outerRegistration->update(m_provider, new CallbackPromiseAdapter<void, ServiceWorkerError>(resolver)); |
- return promise; |
+ m_outerRegistration->update(m_provider); |
} |
ScriptPromise ServiceWorkerRegistration::unregister(ScriptState* scriptState) |