Index: Source/modules/serviceworkers/WaitUntilObserver.cpp |
diff --git a/Source/modules/serviceworkers/WaitUntilObserver.cpp b/Source/modules/serviceworkers/WaitUntilObserver.cpp |
index 4cb47eae9d6767d8b8c2403f238c65eaa6bc72d3..1672b6c66f04f0dd6bbff0151a8cc8be6ce80b71 100644 |
--- a/Source/modules/serviceworkers/WaitUntilObserver.cpp |
+++ b/Source/modules/serviceworkers/WaitUntilObserver.cpp |
@@ -107,7 +107,7 @@ void WaitUntilObserver::didDispatchEvent(bool errorOccurred) |
m_eventDispatched = true; |
} |
-void WaitUntilObserver::waitUntil(ScriptState* scriptState, const ScriptValue& value, ExceptionState& exceptionState) |
+void WaitUntilObserver::waitUntil(ScriptState* scriptState, ScriptPromise scriptPromise, ExceptionState& exceptionState) |
{ |
if (m_eventDispatched) { |
exceptionState.throwDOMException(InvalidStateError, "The event handler is already finished."); |
@@ -126,7 +126,7 @@ void WaitUntilObserver::waitUntil(ScriptState* scriptState, const ScriptValue& v |
m_consumeWindowInteractionTimer.startOneShot(windowInteractionTimeout(), FROM_HERE); |
incrementPendingActivity(); |
- ScriptPromise::cast(scriptState, value).then( |
+ scriptPromise.then( |
ThenFunction::createFunction(scriptState, this, ThenFunction::Fulfilled), |
ThenFunction::createFunction(scriptState, this, ThenFunction::Rejected)); |
} |