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 | 10 |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 // (required for public API: V8::V8::TerminateExecution). | 243 // (required for public API: V8::V8::TerminateExecution). |
244 static ThreadId FromInteger(int id) { return ThreadId(id); } | 244 static ThreadId FromInteger(int id) { return ThreadId(id); } |
245 | 245 |
246 private: | 246 private: |
247 static const int kInvalidId = -1; | 247 static const int kInvalidId = -1; |
248 | 248 |
249 explicit ThreadId(int id) { base::NoBarrier_Store(&id_, id); } | 249 explicit ThreadId(int id) { base::NoBarrier_Store(&id_, id); } |
250 | 250 |
251 static int AllocateThreadId(); | 251 static int AllocateThreadId(); |
252 | 252 |
253 static int GetCurrentThreadId(); | 253 V8_EXPORT_PRIVATE static int GetCurrentThreadId(); |
254 | 254 |
255 base::Atomic32 id_; | 255 base::Atomic32 id_; |
256 | 256 |
257 static base::Atomic32 highest_thread_id_; | 257 static base::Atomic32 highest_thread_id_; |
258 | 258 |
259 friend class Isolate; | 259 friend class Isolate; |
260 }; | 260 }; |
261 | 261 |
262 | 262 |
263 #define FIELD_ACCESSOR(type, name) \ | 263 #define FIELD_ACCESSOR(type, name) \ |
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1683 | 1683 |
1684 EmbeddedVector<char, 128> filename_; | 1684 EmbeddedVector<char, 128> filename_; |
1685 FILE* file_; | 1685 FILE* file_; |
1686 int scope_depth_; | 1686 int scope_depth_; |
1687 }; | 1687 }; |
1688 | 1688 |
1689 } // namespace internal | 1689 } // namespace internal |
1690 } // namespace v8 | 1690 } // namespace v8 |
1691 | 1691 |
1692 #endif // V8_ISOLATE_H_ | 1692 #endif // V8_ISOLATE_H_ |
OLD | NEW |