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

Unified Diff: Source/core/workers/WorkerGlobalScope.cpp

Issue 27311002: Introduce ExecutionContextClient (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix clang build error Created 7 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
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « Source/core/workers/WorkerGlobalScope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698