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

Unified Diff: gin/public/isolate_holder.h

Issue 2897853002: [gin] Make a new IsolateHolder ctor for snapshot (Closed)
Patch Set: Create SnapshotCreator in IsolateHolder 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
« no previous file with comments | « gin/isolate_holder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gin/public/isolate_holder.h
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index 0d9cb3b39ef17561c090cf57d0f8dc916a67f0c7..e28462138657217b9b00f785c22e55e4c5502d9d 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -60,6 +60,11 @@ class GIN_EXPORT IsolateHolder {
IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner,
AccessMode access_mode,
AllowAtomicsWaitMode atomics_wait_mode);
+
+ // This constructor is to create V8 snapshot for Blink.
+ // Note this constructor calls isolate->Enter() internally.
+ IsolateHolder(intptr_t* reference_table, v8::StartupData* existing_blob);
+
~IsolateHolder();
// Should be invoked once before creating IsolateHolder instances to
@@ -91,6 +96,10 @@ class GIN_EXPORT IsolateHolder {
// This method returns if v8::Locker is needed to access isolate.
AccessMode access_mode() const { return access_mode_; }
+ v8::SnapshotCreator* snapshot_creator() const {
+ return snapshot_creator_.get();
+ }
+
void EnableIdleTasks(std::unique_ptr<V8IdleTaskRunner> idle_task_runner);
// This method returns V8IsolateMemoryDumpProvider of this isolate, used for
@@ -105,6 +114,7 @@ class GIN_EXPORT IsolateHolder {
std::unique_ptr<PerIsolateData> isolate_data_;
std::unique_ptr<RunMicrotasksObserver> task_observer_;
std::unique_ptr<V8IsolateMemoryDumpProvider> isolate_memory_dump_provider_;
+ std::unique_ptr<v8::SnapshotCreator> snapshot_creator_;
AccessMode access_mode_;
DISALLOW_COPY_AND_ASSIGN(IsolateHolder);
« no previous file with comments | « gin/isolate_holder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698