| 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 <memory> | 8 #include <memory> |
| 9 #include <queue> | 9 #include <queue> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1166 void RemoveAllThreads(Isolate* isolate); | 1166 void RemoveAllThreads(Isolate* isolate); |
| 1167 | 1167 |
| 1168 private: | 1168 private: |
| 1169 PerIsolateThreadData* list_; | 1169 PerIsolateThreadData* list_; |
| 1170 }; | 1170 }; |
| 1171 | 1171 |
| 1172 // These items form a stack synchronously with threads Enter'ing and Exit'ing | 1172 // These items form a stack synchronously with threads Enter'ing and Exit'ing |
| 1173 // the Isolate. The top of the stack points to a thread which is currently | 1173 // the Isolate. The top of the stack points to a thread which is currently |
| 1174 // running the Isolate. When the stack is empty, the Isolate is considered | 1174 // running the Isolate. When the stack is empty, the Isolate is considered |
| 1175 // not entered by any thread and can be Disposed. | 1175 // not entered by any thread and can be Disposed. |
| 1176 // If the same thread enters the Isolate more then once, the entry_count_ | 1176 // If the same thread enters the Isolate more than once, the entry_count_ |
| 1177 // is incremented rather then a new item pushed to the stack. | 1177 // is incremented rather then a new item pushed to the stack. |
| 1178 class EntryStackItem { | 1178 class EntryStackItem { |
| 1179 public: | 1179 public: |
| 1180 EntryStackItem(PerIsolateThreadData* previous_thread_data, | 1180 EntryStackItem(PerIsolateThreadData* previous_thread_data, |
| 1181 Isolate* previous_isolate, | 1181 Isolate* previous_isolate, |
| 1182 EntryStackItem* previous_item) | 1182 EntryStackItem* previous_item) |
| 1183 : entry_count(1), | 1183 : entry_count(1), |
| 1184 previous_thread_data(previous_thread_data), | 1184 previous_thread_data(previous_thread_data), |
| 1185 previous_isolate(previous_isolate), | 1185 previous_isolate(previous_isolate), |
| 1186 previous_item(previous_item) { } | 1186 previous_item(previous_item) { } |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1642 | 1642 |
| 1643 EmbeddedVector<char, 128> filename_; | 1643 EmbeddedVector<char, 128> filename_; |
| 1644 FILE* file_; | 1644 FILE* file_; |
| 1645 int scope_depth_; | 1645 int scope_depth_; |
| 1646 }; | 1646 }; |
| 1647 | 1647 |
| 1648 } // namespace internal | 1648 } // namespace internal |
| 1649 } // namespace v8 | 1649 } // namespace v8 |
| 1650 | 1650 |
| 1651 #endif // V8_ISOLATE_H_ | 1651 #endif // V8_ISOLATE_H_ |
| OLD | NEW |