Index: third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
diff --git a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
index 8fdb935c43cc41dc37c59eedf778f1aa1546ec21..81da78f9fca8308c42d94c4448e7aa83b77245a1 100644 |
--- a/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
+++ b/third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerGlobalScope.cpp |
@@ -44,7 +44,7 @@ |
#include "core/inspector/WorkerInspectorController.h" |
#include "core/loader/ThreadableLoader.h" |
#include "core/workers/WorkerClients.h" |
-#include "core/workers/WorkerThreadStartupData.h" |
+#include "core/workers/WorkerScriptStartupData.h" |
#include "modules/EventTargetModules.h" |
#include "modules/cachestorage/CacheStorage.h" |
#include "modules/cachestorage/InspectorCacheStorageAgent.h" |
@@ -52,8 +52,8 @@ |
#include "modules/serviceworkers/ServiceWorkerClients.h" |
#include "modules/serviceworkers/ServiceWorkerGlobalScopeClient.h" |
#include "modules/serviceworkers/ServiceWorkerRegistration.h" |
+#include "modules/serviceworkers/ServiceWorkerScript.h" |
#include "modules/serviceworkers/ServiceWorkerScriptCachedMetadataHandler.h" |
-#include "modules/serviceworkers/ServiceWorkerThread.h" |
#include "modules/serviceworkers/WaitUntilObserver.h" |
#include "platform/Histogram.h" |
#include "platform/network/ResourceRequest.h" |
@@ -65,11 +65,11 @@ |
namespace blink { |
-PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::create(ServiceWorkerThread* thread, PassOwnPtr<WorkerThreadStartupData> startupData) |
+PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::create(ServiceWorkerScript* script, PassOwnPtr<WorkerScriptStartupData> startupData) |
{ |
// Note: startupData is finalized on return. After the relevant parts has been |
// passed along to the created 'context'. |
- RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefWillBeNoop(new ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, thread, monotonicallyIncreasingTime(), startupData->m_starterOriginPrivilegeData.release(), startupData->m_workerClients.release())); |
+ RefPtrWillBeRawPtr<ServiceWorkerGlobalScope> context = adoptRefWillBeNoop(new ServiceWorkerGlobalScope(startupData->m_scriptURL, startupData->m_userAgent, script, monotonicallyIncreasingTime(), startupData->m_starterOriginPrivilegeData.release(), startupData->m_workerClients.release())); |
context->setV8CacheOptions(startupData->m_v8CacheOptions); |
context->applyContentSecurityPolicyFromVector(*startupData->m_contentSecurityPolicyHeaders); |
@@ -77,8 +77,8 @@ PassRefPtrWillBeRawPtr<ServiceWorkerGlobalScope> ServiceWorkerGlobalScope::creat |
return context.release(); |
} |
-ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerThread* thread, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
- : WorkerGlobalScope(url, userAgent, thread, timeOrigin, starterOriginPrivilegeData, workerClients) |
+ServiceWorkerGlobalScope::ServiceWorkerGlobalScope(const KURL& url, const String& userAgent, ServiceWorkerScript* script, double timeOrigin, PassOwnPtr<SecurityOrigin::PrivilegeData> starterOriginPrivilegeData, PassOwnPtrWillBeRawPtr<WorkerClients> workerClients) |
+ : WorkerGlobalScope(url, userAgent, script, timeOrigin, starterOriginPrivilegeData, workerClients) |
, m_didEvaluateScript(false) |
, m_hadErrorInTopLevelEventHandler(false) |
, m_eventNestingLevel(0) |
@@ -184,7 +184,7 @@ void ServiceWorkerGlobalScope::dispatchExtendableEvent(PassRefPtrWillBeRawPtr<Ev |
observer->willDispatchEvent(); |
dispatchEvent(event); |
- if (thread()->terminated()) |
+ if (workerScript()->terminated()) |
m_hadErrorInTopLevelEventHandler = true; |
observer->didDispatchEvent(m_hadErrorInTopLevelEventHandler); |
} |