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

Unified Diff: third_party/WebKit/Source/core/workers/WorkerThread.cpp

Issue 1726903002: Rename WorkerOrWorkletGlobalScope::script() to scriptController() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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/core/workers/WorkerThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerThread.cpp b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
index 238b3ddd83fa75ed5a2ed49f960055653a4ab277..7531f85f8fd3380bb9d78c4486aa3c0272634be2 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -71,7 +71,7 @@ public:
{
Microtask::performCheckpoint(m_workerThread->isolate());
if (WorkerGlobalScope* globalScope = m_workerThread->workerGlobalScope()) {
- if (WorkerOrWorkletScriptController* scriptController = globalScope->script())
+ if (WorkerOrWorkletScriptController* scriptController = globalScope->scriptController())
scriptController->rejectedPromises()->processQueue();
if (globalScope->isClosing()) {
m_workerThread->workerReportingProxy().workerGlobalScopeClosed();
@@ -283,18 +283,18 @@ void WorkerThread::initialize(PassOwnPtr<WorkerThreadStartupData> startupData)
// Notify proxy that a new WorkerGlobalScope has been created and started.
m_workerReportingProxy.workerGlobalScopeStarted(m_workerGlobalScope.get());
- WorkerOrWorkletScriptController* script = m_workerGlobalScope->script();
- if (!script->isExecutionForbidden())
- script->initializeContextIfNeeded();
+ WorkerOrWorkletScriptController* scriptController = m_workerGlobalScope->scriptController();
+ if (!scriptController->isExecutionForbidden())
+ scriptController->initializeContextIfNeeded();
}
m_workerGlobalScope->workerInspectorController()->workerContextInitialized(startMode == PauseWorkerGlobalScopeOnStart);
- if (m_workerGlobalScope->script()->isContextInitialized()) {
+ if (m_workerGlobalScope->scriptController()->isContextInitialized()) {
m_workerReportingProxy.didInitializeWorkerContext();
}
OwnPtrWillBeRawPtr<CachedMetadataHandler> handler(workerGlobalScope()->createWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get()));
- bool success = m_workerGlobalScope->script()->evaluate(ScriptSourceCode(sourceCode, scriptURL), nullptr, handler.get(), v8CacheOptions);
+ bool success = m_workerGlobalScope->scriptController()->evaluate(ScriptSourceCode(sourceCode, scriptURL), nullptr, handler.get(), v8CacheOptions);
m_workerGlobalScope->didEvaluateWorkerScript();
m_workerReportingProxy.didEvaluateWorkerScript(success);
@@ -401,7 +401,7 @@ void WorkerThread::terminateInternal()
return;
// Ensure that tasks are being handled by thread event loop. If script execution weren't forbidden, a while(1) loop in JS could keep the thread alive forever.
- m_workerGlobalScope->script()->willScheduleExecutionTermination();
+ m_workerGlobalScope->scriptController()->willScheduleExecutionTermination();
terminateV8Execution();
InspectorInstrumentation::didKillAllExecutionContextTasks(m_workerGlobalScope.get());

Powered by Google App Engine
This is Rietveld 408576698