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

Side by Side Diff: src/isolate.h

Issue 1409993012: Add {CancelableTaskManager} to handle {Cancelable} concurrent tasks. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « src/heap/scavenge-job.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <set> 9 #include <set>
10 10
(...skipping 1075 matching lines...) Expand 10 before | Expand all | Expand 10 after
1086 1086
1087 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) { 1087 void set_array_buffer_allocator(v8::ArrayBuffer::Allocator* allocator) {
1088 array_buffer_allocator_ = allocator; 1088 array_buffer_allocator_ = allocator;
1089 } 1089 }
1090 v8::ArrayBuffer::Allocator* array_buffer_allocator() const { 1090 v8::ArrayBuffer::Allocator* array_buffer_allocator() const {
1091 return array_buffer_allocator_; 1091 return array_buffer_allocator_;
1092 } 1092 }
1093 1093
1094 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } 1094 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; }
1095 1095
1096 void RegisterCancelableTask(Cancelable* task); 1096 CancelableTaskManager* cancelable_task_manager() {
1097 void RemoveCancelableTask(Cancelable* task); 1097 return cancelable_task_manager_;
1098 }
1098 1099
1099 interpreter::Interpreter* interpreter() const { return interpreter_; } 1100 interpreter::Interpreter* interpreter() const { return interpreter_; }
1100 1101
1101 protected: 1102 protected:
1102 explicit Isolate(bool enable_serializer); 1103 explicit Isolate(bool enable_serializer);
1103 1104
1104 private: 1105 private:
1105 friend struct GlobalState; 1106 friend struct GlobalState;
1106 friend struct InitializeGlobalState; 1107 friend struct InitializeGlobalState;
1107 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, 1108 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map,
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
1331 1332
1332 v8::Isolate::UseCounterCallback use_counter_callback_; 1333 v8::Isolate::UseCounterCallback use_counter_callback_;
1333 BasicBlockProfiler* basic_block_profiler_; 1334 BasicBlockProfiler* basic_block_profiler_;
1334 1335
1335 List<Object*> partial_snapshot_cache_; 1336 List<Object*> partial_snapshot_cache_;
1336 1337
1337 v8::ArrayBuffer::Allocator* array_buffer_allocator_; 1338 v8::ArrayBuffer::Allocator* array_buffer_allocator_;
1338 1339
1339 FutexWaitListNode futex_wait_list_node_; 1340 FutexWaitListNode futex_wait_list_node_;
1340 1341
1341 std::set<Cancelable*> cancelable_tasks_; 1342 CancelableTaskManager* cancelable_task_manager_;
1342 1343
1343 v8::Isolate::AbortOnUncaughtExceptionCallback 1344 v8::Isolate::AbortOnUncaughtExceptionCallback
1344 abort_on_uncaught_exception_callback_; 1345 abort_on_uncaught_exception_callback_;
1345 1346
1346 friend class ExecutionAccess; 1347 friend class ExecutionAccess;
1347 friend class HandleScopeImplementer; 1348 friend class HandleScopeImplementer;
1348 friend class OptimizingCompileDispatcher; 1349 friend class OptimizingCompileDispatcher;
1349 friend class SweeperThread; 1350 friend class SweeperThread;
1350 friend class ThreadManager; 1351 friend class ThreadManager;
1351 friend class Simulator; 1352 friend class Simulator;
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 1566
1566 EmbeddedVector<char, 128> filename_; 1567 EmbeddedVector<char, 128> filename_;
1567 FILE* file_; 1568 FILE* file_;
1568 int scope_depth_; 1569 int scope_depth_;
1569 }; 1570 };
1570 1571
1571 } // namespace internal 1572 } // namespace internal
1572 } // namespace v8 1573 } // namespace v8
1573 1574
1574 #endif // V8_ISOLATE_H_ 1575 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/heap/scavenge-job.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698