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

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

Issue 2877543003: [ServiceWorker] Allow waitUntil to be called multiple times asynchronously (Closed)
Patch Set: Address comments from shimazu@ Created 3 years, 7 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: third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
diff --git a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
index 4d347a7f9e40dde6a1f9786c12944a801fe689f1..13ed0e8d161896bc4d35768800120cab87942458 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
+++ b/third_party/WebKit/Source/modules/serviceworkers/RespondWithObserver.cpp
@@ -81,7 +81,7 @@ void RespondWithObserver::DidDispatchEvent(
return;
if (dispatch_result != DispatchEventResult::kNotCanceled) {
- observer_->IncrementPendingActivity();
+ observer_->IncrementPendingPromise();
ResponseWasRejected(kWebServiceWorkerResponseErrorDefaultPrevented);
return;
}
@@ -101,7 +101,7 @@ void RespondWithObserver::RespondWith(ScriptState* script_state,
}
state_ = kPending;
- observer_->IncrementPendingActivity();
+ observer_->IncrementPendingPromise();
script_promise.Then(ThenFunction::CreateFunction(script_state, this,
ThenFunction::kFulfilled),
ThenFunction::CreateFunction(script_state, this,
@@ -112,14 +112,14 @@ void RespondWithObserver::ResponseWasRejected(
WebServiceWorkerResponseError error) {
OnResponseRejected(error);
state_ = kDone;
- observer_->DecrementPendingActivity();
+ observer_->DecrementPendingPromise();
observer_.Clear();
}
void RespondWithObserver::ResponseWasFulfilled(const ScriptValue& value) {
OnResponseFulfilled(value);
state_ = kDone;
- observer_->DecrementPendingActivity();
+ observer_->DecrementPendingPromise();
observer_.Clear();
}

Powered by Google App Engine
This is Rietveld 408576698