Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2021)

Unified Diff: Source/modules/serviceworkers/WaitUntilObserver.cpp

Issue 1256133002: Service Worker: Correct Web IDL of ExtendableEvent.waitUntil method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address comment: add/delete headers. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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));
}

Powered by Google App Engine
This is Rietveld 408576698