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

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

Issue 17648006: Rename WorkerContext to WorkerGlobalScope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 6 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/Worker.h ('k') | Source/core/workers/WorkerContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/workers/Worker.cpp
diff --git a/Source/core/workers/Worker.cpp b/Source/core/workers/Worker.cpp
index 00389db9f479083f5c38cc9af20a1c0905ce4be3..09ba961b32dbe8de7e5108d4e89156e544dbeaa2 100644
--- a/Source/core/workers/Worker.cpp
+++ b/Source/core/workers/Worker.cpp
@@ -40,7 +40,7 @@
#include "core/page/DOMWindow.h"
#include "core/page/Frame.h"
#include "core/page/UseCounter.h"
-#include "core/workers/WorkerContextProxy.h"
+#include "core/workers/WorkerGlobalScopeProxy.h"
#include "core/workers/WorkerScriptLoader.h"
#include "core/workers/WorkerThread.h"
#include "wtf/MainThread.h"
@@ -49,7 +49,7 @@ namespace WebCore {
inline Worker::Worker(ScriptExecutionContext* context)
: AbstractWorker(context)
- , m_contextProxy(WorkerContextProxy::create(this))
+ , m_contextProxy(WorkerGlobalScopeProxy::create(this))
{
ScriptWrappable::init(this);
}
@@ -94,12 +94,12 @@ void Worker::postMessage(PassRefPtr<SerializedScriptValue> message, const Messag
OwnPtr<MessagePortChannelArray> channels = MessagePort::disentanglePorts(ports, ec);
if (ec)
return;
- m_contextProxy->postMessageToWorkerContext(message, channels.release());
+ m_contextProxy->postMessageToWorkerGlobalScope(message, channels.release());
}
void Worker::terminate()
{
- m_contextProxy->terminateWorkerContext();
+ m_contextProxy->terminateWorkerGlobalScope();
}
bool Worker::canSuspend() const
@@ -128,10 +128,10 @@ void Worker::notifyFinished()
if (m_scriptLoader->failed())
dispatchEvent(Event::create(eventNames().errorEvent, false, true));
else {
- WorkerThreadStartMode startMode = DontPauseWorkerContextOnStart;
+ WorkerThreadStartMode startMode = DontPauseWorkerGlobalScopeOnStart;
if (InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart(scriptExecutionContext()))
- startMode = PauseWorkerContextOnStart;
- m_contextProxy->startWorkerContext(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode);
+ startMode = PauseWorkerGlobalScopeOnStart;
+ m_contextProxy->startWorkerGlobalScope(m_scriptLoader->url(), scriptExecutionContext()->userAgent(m_scriptLoader->url()), m_scriptLoader->script(), startMode);
InspectorInstrumentation::scriptImported(scriptExecutionContext(), m_scriptLoader->identifier(), m_scriptLoader->script());
}
m_scriptLoader = nullptr;
« no previous file with comments | « Source/core/workers/Worker.h ('k') | Source/core/workers/WorkerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698