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

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

Issue 2118243002: [proof-of-concept] SW thread independent of the main thread Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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/ServiceWorkerGlobalScope.h
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
index 2c055339275673e8f7f0582711b897836fad6334..5c9a650063182ee8227dc703b3c5b4ced3c40927 100644
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.h
@@ -42,6 +42,7 @@
namespace blink {
class Dictionary;
+class IsolatedWorkerThread;
class Request;
class ScriptPromise;
class ScriptState;
@@ -56,6 +57,7 @@ typedef RequestOrUSVString RequestInfo;
class MODULES_EXPORT ServiceWorkerGlobalScope final : public WorkerGlobalScope {
DEFINE_WRAPPERTYPEINFO();
public:
+ static ServiceWorkerGlobalScope* create(IsolatedWorkerThread*, std::unique_ptr<WorkerThreadStartupData>);
static ServiceWorkerGlobalScope* create(ServiceWorkerThread*, std::unique_ptr<WorkerThreadStartupData>);
~ServiceWorkerGlobalScope() override;
@@ -93,6 +95,7 @@ protected:
bool addEventListenerInternal(const AtomicString& eventType, EventListener*, const AddEventListenerOptionsResolved&) override;
private:
+ ServiceWorkerGlobalScope(const KURL&, const String& userAgent, IsolatedWorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData>);
ServiceWorkerGlobalScope(const KURL&, const String& userAgent, ServiceWorkerThread*, double timeOrigin, std::unique_ptr<SecurityOrigin::PrivilegeData>, WorkerClients*);
void importScripts(const Vector<String>& urls, ExceptionState&) override;
CachedMetadataHandler* createWorkerScriptCachedMetadataHandler(const KURL& scriptURL, const Vector<char>* metaData) override;
@@ -101,6 +104,7 @@ private:
Member<ServiceWorkerClients> m_clients;
Member<ServiceWorkerRegistration> m_registration;
+ const bool m_isIsolatedWorkerGlobalScope;
bool m_didEvaluateScript;
bool m_hadErrorInTopLevelEventHandler;
unsigned m_eventNestingLevel;

Powered by Google App Engine
This is Rietveld 408576698