OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project 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 V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include "include/v8-debug.h" | 9 #include "include/v8-debug.h" |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 | 1120 |
1121 List<Object*>* partial_snapshot_cache() { return &partial_snapshot_cache_; } | 1121 List<Object*>* partial_snapshot_cache() { return &partial_snapshot_cache_; } |
1122 | 1122 |
1123 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) { | 1123 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) { |
1124 array_buffer_allocator_ = allocator; | 1124 array_buffer_allocator_ = allocator; |
1125 } | 1125 } |
1126 v8::ArrayBuffer::Allocator* array_buffer_allocator() const { | 1126 v8::ArrayBuffer::Allocator* array_buffer_allocator() const { |
1127 return array_buffer_allocator_; | 1127 return array_buffer_allocator_; |
1128 } | 1128 } |
1129 | 1129 |
| 1130 void set_shared_array_buffer_allocator( |
| 1131 v8::ArrayBuffer::Allocator* allocator) { |
| 1132 shared_array_buffer_allocator_ = allocator; |
| 1133 } |
| 1134 v8::ArrayBuffer::Allocator* shared_array_buffer_allocator() { |
| 1135 return shared_array_buffer_allocator_; |
| 1136 } |
| 1137 |
1130 protected: | 1138 protected: |
1131 explicit Isolate(bool enable_serializer); | 1139 explicit Isolate(bool enable_serializer); |
1132 | 1140 |
1133 private: | 1141 private: |
1134 friend struct GlobalState; | 1142 friend struct GlobalState; |
1135 friend struct InitializeGlobalState; | 1143 friend struct InitializeGlobalState; |
1136 | 1144 |
1137 // These fields are accessed through the API, offsets must be kept in sync | 1145 // These fields are accessed through the API, offsets must be kept in sync |
1138 // with v8::internal::Internals (in include/v8.h) constants. This is also | 1146 // with v8::internal::Internals (in include/v8.h) constants. This is also |
1139 // verified in Isolate::Init() using runtime checks. | 1147 // verified in Isolate::Init() using runtime checks. |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1349 | 1357 |
1350 // List of callbacks when a Call completes. | 1358 // List of callbacks when a Call completes. |
1351 List<CallCompletedCallback> call_completed_callbacks_; | 1359 List<CallCompletedCallback> call_completed_callbacks_; |
1352 | 1360 |
1353 v8::Isolate::UseCounterCallback use_counter_callback_; | 1361 v8::Isolate::UseCounterCallback use_counter_callback_; |
1354 BasicBlockProfiler* basic_block_profiler_; | 1362 BasicBlockProfiler* basic_block_profiler_; |
1355 | 1363 |
1356 List<Object*> partial_snapshot_cache_; | 1364 List<Object*> partial_snapshot_cache_; |
1357 | 1365 |
1358 v8::ArrayBuffer::Allocator* array_buffer_allocator_; | 1366 v8::ArrayBuffer::Allocator* array_buffer_allocator_; |
| 1367 v8::ArrayBuffer::Allocator* shared_array_buffer_allocator_; |
1359 | 1368 |
1360 friend class ExecutionAccess; | 1369 friend class ExecutionAccess; |
1361 friend class HandleScopeImplementer; | 1370 friend class HandleScopeImplementer; |
1362 friend class OptimizingCompileDispatcher; | 1371 friend class OptimizingCompileDispatcher; |
1363 friend class SweeperThread; | 1372 friend class SweeperThread; |
1364 friend class ThreadManager; | 1373 friend class ThreadManager; |
1365 friend class Simulator; | 1374 friend class Simulator; |
1366 friend class StackGuard; | 1375 friend class StackGuard; |
1367 friend class ThreadId; | 1376 friend class ThreadId; |
1368 friend class TestMemoryAllocatorScope; | 1377 friend class TestMemoryAllocatorScope; |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 } | 1587 } |
1579 | 1588 |
1580 EmbeddedVector<char, 128> filename_; | 1589 EmbeddedVector<char, 128> filename_; |
1581 FILE* file_; | 1590 FILE* file_; |
1582 int scope_depth_; | 1591 int scope_depth_; |
1583 }; | 1592 }; |
1584 | 1593 |
1585 } } // namespace v8::internal | 1594 } } // namespace v8::internal |
1586 | 1595 |
1587 #endif // V8_ISOLATE_H_ | 1596 #endif // V8_ISOLATE_H_ |
OLD | NEW |