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

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

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Work for yuki's comments Created 3 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
Index: third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
diff --git a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
index d21557b9f79bce9483fddb0c92e0319aea2e00e4..4c53f8e0d981cd9b5d8c92bc700928035a3cb4f9 100644
--- a/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
+++ b/third_party/WebKit/Source/core/workers/WorkerBackingThread.cpp
@@ -9,6 +9,7 @@
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8IdleTaskRunner.h"
#include "bindings/core/v8/V8Initializer.h"
+#include "bindings/core/v8/V8SnapshotUtil.h"
#include "core/inspector/WorkerThreadDebugger.h"
#include "platform/CrossThreadFunctional.h"
#include "platform/RuntimeEnabledFeatures.h"
@@ -60,8 +61,12 @@ WorkerBackingThread::~WorkerBackingThread() {}
void WorkerBackingThread::Initialize() {
DCHECK(!isolate_);
backing_thread_->Initialize();
+ // TODO(peria): Replace GetReferenceTable with nullptr.
+ // (http://crbug.com/v8/6448)
isolate_ = V8PerIsolateData::Initialize(
- backing_thread_->PlatformThread().GetWebTaskRunner());
+ backing_thread_->PlatformThread().GetWebTaskRunner(),
+ V8SnapshotUtil::GetReferenceTable(),
+ V8PerIsolateData::V8ContextMode::kDontUseSnapshot);
AddWorkerIsolate(isolate_);
V8Initializer::InitializeWorker(isolate_);

Powered by Google App Engine
This is Rietveld 408576698