OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_EXECUTION_H_ | 5 #ifndef V8_EXECUTION_H_ |
6 #define V8_EXECUTION_H_ | 6 #define V8_EXECUTION_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/atomicops.h" | 9 #include "src/base/atomicops.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 Isolate* isolate_; | 240 Isolate* isolate_; |
241 ThreadLocal thread_local_; | 241 ThreadLocal thread_local_; |
242 | 242 |
243 friend class Isolate; | 243 friend class Isolate; |
244 friend class StackLimitCheck; | 244 friend class StackLimitCheck; |
245 friend class PostponeInterruptsScope; | 245 friend class PostponeInterruptsScope; |
246 | 246 |
247 DISALLOW_COPY_AND_ASSIGN(StackGuard); | 247 DISALLOW_COPY_AND_ASSIGN(StackGuard); |
248 }; | 248 }; |
249 | 249 |
| 250 |
| 251 // Stack-allocated object to track Javascript execution within its scope. |
| 252 class JavascriptExecutionObserver BASE_EMBEDDED { |
| 253 public: |
| 254 explicit JavascriptExecutionObserver(Isolate* isolate); |
| 255 ~JavascriptExecutionObserver(); |
| 256 |
| 257 static void SetObserved(Isolate* isolate); |
| 258 bool observed() const { return observed_; } |
| 259 |
| 260 private: |
| 261 Isolate* isolate_; |
| 262 JavascriptExecutionObserver* prev_; |
| 263 bool observed_; |
| 264 |
| 265 DISALLOW_COPY_AND_ASSIGN(JavascriptExecutionObserver); |
| 266 }; |
| 267 |
250 } // namespace internal | 268 } // namespace internal |
251 } // namespace v8 | 269 } // namespace v8 |
252 | 270 |
253 #endif // V8_EXECUTION_H_ | 271 #endif // V8_EXECUTION_H_ |
OLD | NEW |