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

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

Issue 1255933004: Service Worker: Correct Web IDL of FetchEvent.respondWith method. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename IDL argument and method params. 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/RespondWithObserver.cpp
diff --git a/Source/modules/serviceworkers/RespondWithObserver.cpp b/Source/modules/serviceworkers/RespondWithObserver.cpp
index 98b792df6a7c071dd698d8aa11de744a5e32bcbf..b63f7e1cdf35d5cc3a76825b77ae0a9511e06431 100644
--- a/Source/modules/serviceworkers/RespondWithObserver.cpp
+++ b/Source/modules/serviceworkers/RespondWithObserver.cpp
@@ -132,7 +132,7 @@ void RespondWithObserver::didDispatchEvent(bool defaultPrevented)
m_state = Done;
}
-void RespondWithObserver::respondWith(ScriptState* scriptState, const ScriptValue& value, ExceptionState& exceptionState)
+void RespondWithObserver::respondWith(ScriptState* scriptState, ScriptPromise& scriptPromise, ExceptionState& exceptionState)
{
if (m_state != Initial) {
exceptionState.throwDOMException(InvalidStateError, "The fetch event has already been responded to.");
@@ -140,7 +140,7 @@ void RespondWithObserver::respondWith(ScriptState* scriptState, const ScriptValu
}
m_state = Pending;
- 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