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

Unified Diff: third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h

Issue 2034663002: ServiceWorker: Keep the worker alive until FetchEvent.waitUntil settles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/WaitUntilObserver.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
index ac398952d5c389032b0ac3a65e3397a011d0ae32..53187cbe8e03b072fd6eb4a1f6a7543d59bca06e 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/WaitUntilObserver.h
@@ -25,6 +25,7 @@ class MODULES_EXPORT WaitUntilObserver final : public GarbageCollectedFinalized<
public:
enum EventType {
Activate,
+ Fetch,
Install,
Message,
NotificationClick,
@@ -43,6 +44,12 @@ public:
// the given promise is resolved or rejected.
void waitUntil(ScriptState*, ScriptPromise, ExceptionState&);
+ // These methods can be called when the lifecycle of ExtendableEvent
+ // observed by this WaitUntilObserver should be extended by other reason
+ // than ExtendableEvent.waitUntil.
+ void incrementPendingActivity();
+ void decrementPendingActivity();
+
DECLARE_VIRTUAL_TRACE();
private:
@@ -53,9 +60,6 @@ private:
void reportError(const ScriptValue&);
- void incrementPendingActivity();
- void decrementPendingActivity();
-
void consumeWindowInteraction(Timer<WaitUntilObserver>*);
EventType m_type;

Powered by Google App Engine
This is Rietveld 408576698