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

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

Issue 2355723005: Worker: Introduce WorkerReportingProxy::willEvaluateWorkerScript() (Closed)
Patch Set: fix comment Created 4 years, 3 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 d4211b68570e79c4107dbd0788b5ecf48ce9a955..5db6f3f0c81d7fe41ffc37109140f79ebb639687 100644
--- a/third_party/WebKit/Source/core/workers/WorkerThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerThread.cpp
@@ -520,9 +520,6 @@ void WorkerThread::initializeOnWorkerThread(std::unique_ptr<WorkerThreadStartupD
m_workerReportingProxy.didCreateWorkerGlobalScope(globalScope());
m_workerInspectorController = WorkerInspectorController::create(this);
- if (globalScope()->isWorkerGlobalScope())
- m_workerReportingProxy.didLoadWorkerScript(sourceCode.length(), cachedMetaData.get() ? cachedMetaData->size() : 0);
-
globalScope()->scriptController()->initializeContextIfNeeded();
// If Origin Trials have been registered before the V8 context was ready,
@@ -553,6 +550,7 @@ void WorkerThread::initializeOnWorkerThread(std::unique_ptr<WorkerThreadStartupD
if (globalScope()->isWorkerGlobalScope()) {
WorkerGlobalScope* workerGlobalScope = toWorkerGlobalScope(globalScope());
CachedMetadataHandler* handler = workerGlobalScope->createWorkerScriptCachedMetadataHandler(scriptURL, cachedMetaData.get());
+ m_workerReportingProxy.willEvaluateWorkerScript(sourceCode.length(), cachedMetaData.get() ? cachedMetaData->size() : 0);
bool success = workerGlobalScope->scriptController()->evaluate(ScriptSourceCode(sourceCode, scriptURL), nullptr, handler, v8CacheOptions);
m_workerReportingProxy.didEvaluateWorkerScript(success);
}

Powered by Google App Engine
This is Rietveld 408576698