Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef GIN_PUBLIC_ISOLATE_HOLDER_H_ | 5 #ifndef GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| 6 #define GIN_PUBLIC_ISOLATE_HOLDER_H_ | 6 #define GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 kStableV8Extras, | 52 kStableV8Extras, |
| 53 kStableAndExperimentalV8Extras, | 53 kStableAndExperimentalV8Extras, |
| 54 }; | 54 }; |
| 55 | 55 |
| 56 explicit IsolateHolder( | 56 explicit IsolateHolder( |
| 57 scoped_refptr<base::SingleThreadTaskRunner> task_runner); | 57 scoped_refptr<base::SingleThreadTaskRunner> task_runner); |
| 58 IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 58 IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 59 AccessMode access_mode); | 59 AccessMode access_mode); |
| 60 IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, | 60 IsolateHolder(scoped_refptr<base::SingleThreadTaskRunner> task_runner, |
| 61 AccessMode access_mode, | 61 AccessMode access_mode, |
| 62 AllowAtomicsWaitMode atomics_wait_mode); | 62 AllowAtomicsWaitMode atomics_wait_mode, |
| 63 intptr_t* reference_table, | |
| 64 v8::StartupData* startup_data); | |
| 65 // To take snapshot of v8 Context. | |
|
Yuki
2017/05/30 14:35:56
Let's be a little more descriptive.
// Creates an
peria
2017/06/01 08:33:32
Done.
| |
| 66 explicit IsolateHolder(v8::Isolate* isolate); | |
| 63 ~IsolateHolder(); | 67 ~IsolateHolder(); |
| 64 | 68 |
| 65 // Should be invoked once before creating IsolateHolder instances to | 69 // Should be invoked once before creating IsolateHolder instances to |
| 66 // initialize V8 and Gin. In case V8_USE_EXTERNAL_STARTUP_DATA is | 70 // initialize V8 and Gin. In case V8_USE_EXTERNAL_STARTUP_DATA is |
| 67 // defined, V8's initial natives should be loaded (by calling | 71 // defined, V8's initial natives should be loaded (by calling |
| 68 // V8Initializer::LoadV8NativesFromFD or | 72 // V8Initializer::LoadV8NativesFromFD or |
| 69 // V8Initializer::LoadV8Natives) before calling this method. If the | 73 // V8Initializer::LoadV8Natives) before calling this method. If the |
| 70 // snapshot file is available, it should also be loaded (by calling | 74 // snapshot file is available, it should also be loaded (by calling |
| 71 // V8Initializer::LoadV8SnapshotFromFD or | 75 // V8Initializer::LoadV8SnapshotFromFD or |
| 72 // V8Initializer::LoadV8Snapshot) before calling this method. | 76 // V8Initializer::LoadV8Snapshot) before calling this method. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 106 std::unique_ptr<RunMicrotasksObserver> task_observer_; | 110 std::unique_ptr<RunMicrotasksObserver> task_observer_; |
| 107 std::unique_ptr<V8IsolateMemoryDumpProvider> isolate_memory_dump_provider_; | 111 std::unique_ptr<V8IsolateMemoryDumpProvider> isolate_memory_dump_provider_; |
| 108 AccessMode access_mode_; | 112 AccessMode access_mode_; |
| 109 | 113 |
| 110 DISALLOW_COPY_AND_ASSIGN(IsolateHolder); | 114 DISALLOW_COPY_AND_ASSIGN(IsolateHolder); |
| 111 }; | 115 }; |
| 112 | 116 |
| 113 } // namespace gin | 117 } // namespace gin |
| 114 | 118 |
| 115 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_ | 119 #endif // GIN_PUBLIC_ISOLATE_HOLDER_H_ |
| OLD | NEW |