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

Unified Diff: third_party/WebKit/Source/web/WebKit.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/web/WebKit.cpp
diff --git a/third_party/WebKit/Source/web/WebKit.cpp b/third_party/WebKit/Source/web/WebKit.cpp
index e87484f4b15c60d17ed13a6c161e3d9b9a2cb6a7..1829b19315ecbe9b74eaa98ac6de3c24ba024b56 100644
--- a/third_party/WebKit/Source/web/WebKit.cpp
+++ b/third_party/WebKit/Source/web/WebKit.cpp
@@ -35,6 +35,8 @@
#include "bindings/core/v8/V8BindingForCore.h"
#include "bindings/core/v8/V8GCController.h"
#include "bindings/core/v8/V8Initializer.h"
+#include "bindings/core/v8/V8SnapshotCreator.h"
+#include "bindings/modules/v8/V8SnapshotReference.h"
#include "core/animation/AnimationClock.h"
#include "core/layout/LayoutTheme.h"
#include "core/page/Page.h"
@@ -80,7 +82,10 @@ static ModulesInitializer& GetModulesInitializer() {
void Initialize(Platform* platform) {
Platform::Initialize(platform);
- V8Initializer::InitializeMainThread();
+ // Refernce table must be updated before creating isolates.
+ V8SnapshotCreator::SetReferenceTable(
+ V8SnapshotReference::GetReferenceTable());
+ V8Initializer::InitializeMainThread(platform->TakeV8Snapshot());
GetModulesInitializer().Initialize();

Powered by Google App Engine
This is Rietveld 408576698