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

Unified Diff: Source/modules/serviceworkers/ServiceWorkerGlobalScope.h

Issue 657213004: ServiceWorker: Issue a warning after initial execution of worker script (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Incorporate reviews Created 6 years, 2 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/ServiceWorkerGlobalScope.h
diff --git a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index df83c0dec1c8d21a2709e3b92692cda7743252c7..5a842cca14b39efb6ee23c9f1b9388f4a1c24a00 100644
--- a/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -57,6 +57,9 @@ public:
virtual bool isServiceWorkerGlobalScope() const override { return true; }
virtual void stopFetch() override;
+ // WorkerGlobalScope
horo 2014/10/22 08:51:24 stopFetch() is also WorkerGlobalScope's overridden
shimazu 2014/10/23 00:52:23 Done.
+ virtual void didEvaluateWorkerScript() override;
+
// ServiceWorkerGlobalScope.idl
ServiceWorkerClients* clients();
String scope(ExecutionContext*);
@@ -71,6 +74,7 @@ public:
void close(ExceptionState&);
// EventTarget
+ virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false) override;
virtual const AtomicString& interfaceName() const override;
DEFINE_ATTRIBUTE_EVENT_LISTENER(install);
@@ -89,6 +93,7 @@ private:
PersistentWillBeMember<ServiceWorkerClients> m_clients;
OwnPtr<FetchManager> m_fetchManager;
PersistentWillBeMember<CacheStorage> m_caches;
+ bool m_scriptEvaluated;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698