Chromium Code Reviews| Index: gin/public/isolate_holder.h |
| diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h |
| index 0d9cb3b39ef17561c090cf57d0f8dc916a67f0c7..197bd29815cb3524b99bd467a0657facfdcbc04c 100644 |
| --- a/gin/public/isolate_holder.h |
| +++ b/gin/public/isolate_holder.h |
| @@ -53,13 +53,22 @@ class GIN_EXPORT IsolateHolder { |
| kStableAndExperimentalV8Extras, |
| }; |
| + // Whether to use V8 context snapshot for blink. |
| + enum V8ContextMode { |
|
haraken
2017/05/20 19:10:02
V8ContextShapshotMode
peria
2017/06/01 08:33:32
Done.
|
| + kDefault, |
|
haraken
2017/05/20 19:10:02
kDoNotUseSnapshot
peria
2017/05/30 08:25:43
Done.
|
| + kUseSnapshot, |
| + kTakeSnapshot, |
| + }; |
| + |
| explicit IsolateHolder( |
| scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| AccessMode access_mode); |
| IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| AccessMode access_mode, |
| - AllowAtomicsWaitMode atomics_wait_mode); |
| + AllowAtomicsWaitMode atomics_wait_mode, |
| + intptr_t*, |
|
haraken
2017/05/20 19:10:02
intptr_t* reference_table
peria
2017/05/30 08:25:44
Done.
|
| + V8ContextMode); |
| ~IsolateHolder(); |
| // Should be invoked once before creating IsolateHolder instances to |
| @@ -75,6 +84,7 @@ class GIN_EXPORT IsolateHolder { |
| v8::ArrayBuffer::Allocator* allocator); |
| v8::Isolate* isolate() { return isolate_; } |
| + v8::SnapshotCreator* snapshot_creator() { return snapshot_creator_.get(); } |
| // The implementations of Object.observe() and Promise enqueue v8 Microtasks |
| // that should be executed just before control is returned to the message |
| @@ -100,12 +110,17 @@ class GIN_EXPORT IsolateHolder { |
| return isolate_memory_dump_provider_.get(); |
| } |
| + V8ContextMode v8_context_mode() const { return v8_context_mode_; } |
| + |
| private: |
| v8::Isolate* isolate_; |
| + std::unique_ptr<v8::SnapshotCreator> snapshot_creator_; |
| std::unique_ptr<PerIsolateData> isolate_data_; |
| std::unique_ptr<RunMicrotasksObserver> task_observer_; |
| std::unique_ptr<V8IsolateMemoryDumpProvider> isolate_memory_dump_provider_; |
| AccessMode access_mode_; |
| + v8::StartupData startup_data_; |
| + V8ContextMode v8_context_mode_; |
|
haraken
2017/05/20 19:10:02
Can we probably simplify the code by moving these
peria
2017/05/30 08:25:44
Done.
|
| DISALLOW_COPY_AND_ASSIGN(IsolateHolder); |
| }; |