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

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

Issue 2841443005: [Bindings] Create and use V8 context snapshots (Closed)
Patch Set: Work for most comments Created 3 years, 7 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 d78c45bd9d67ae9ee5a47439d1d186cffa98eb55..0c3fa0ea5cf6898110d51e598e0df47248fcc469 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/V8SnapshotCreator.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(),
+ V8SnapshotCreator::GetReferenceTable(),
+ V8PerIsolateData::V8ContextMode::kDontUseSnapshot);
AddWorkerIsolate(isolate_);
V8Initializer::InitializeWorker(isolate_);

Powered by Google App Engine
This is Rietveld 408576698