Index: Source/core/workers/WorkerGlobalScope.cpp |
diff --git a/Source/core/workers/WorkerGlobalScope.cpp b/Source/core/workers/WorkerGlobalScope.cpp |
index 1214ce9bb551fc0c75550069faf015b85c9c1931..583c3801e492d56ee15e61eb28049563ea692ee9 100644 |
--- a/Source/core/workers/WorkerGlobalScope.cpp |
+++ b/Source/core/workers/WorkerGlobalScope.cpp |
@@ -89,6 +89,7 @@ WorkerGlobalScope::WorkerGlobalScope(const KURL& url, const String& userAgent, W |
, m_workerClients(workerClients) |
{ |
ScriptWrappable::init(this); |
+ setClient(this); |
setSecurityOrigin(SecurityOrigin::create(url)); |
m_workerClients->reattachThread(); |
} |
@@ -102,6 +103,8 @@ WorkerGlobalScope::~WorkerGlobalScope() |
// Notify proxy that we are going away. This can free the WorkerThread object, so do not access it after this. |
thread()->workerReportingProxy().workerGlobalScopeDestroyed(); |
+ |
+ setClient(0); |
} |
void WorkerGlobalScope::applyContentSecurityPolicyFromString(const String& policy, ContentSecurityPolicy::HeaderType contentSecurityPolicyType) |
@@ -145,6 +148,11 @@ void WorkerGlobalScope::disableEval(const String& errorMessage) |
m_script->disableEval(errorMessage); |
} |
+double WorkerGlobalScope::timerAlignmentInterval() const |
+{ |
+ return DOMTimer::visiblePageAlignmentInterval(); |
+} |
+ |
WorkerLocation* WorkerGlobalScope::location() const |
{ |
if (!m_location) |
@@ -321,4 +329,9 @@ WorkerEventQueue* WorkerGlobalScope::eventQueue() const |
return m_eventQueue.get(); |
} |
+PassOwnPtr<LifecycleNotifier> WorkerGlobalScope::createLifecycleNotifier() |
+{ |
+ return ContextLifecycleNotifier::create(this); |
+} |
+ |
} // namespace WebCore |