Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2008 the V8 project authors. All rights reserved. | 1 // Copyright 2008 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_V8_DEBUG_H_ | 5 #ifndef V8_V8_DEBUG_H_ |
| 6 #define V8_V8_DEBUG_H_ | 6 #define V8_V8_DEBUG_H_ |
| 7 | 7 |
| 8 #include "v8.h" // NOLINT(build/include) | 8 #include "v8.h" // NOLINT(build/include) |
| 9 | 9 |
| 10 /** | 10 /** |
| 11 * Debugger support for the V8 JavaScript engine. | 11 * Debugger support for the V8 JavaScript engine. |
| 12 */ | 12 */ |
| 13 namespace v8 { | 13 namespace v8 { |
| 14 | 14 |
| 15 // Debug events which can occur in the V8 JavaScript engine. | 15 // Debug events which can occur in the V8 JavaScript engine. |
| 16 enum DebugEvent { | 16 enum DebugEvent { |
| 17 Break = 1, | 17 Break = 1, |
| 18 Exception = 2, | 18 Exception = 2, |
| 19 NewFunction = 3, | 19 NewFunction = 3, |
| 20 BeforeCompile = 4, | 20 BeforeCompile = 4, |
| 21 AfterCompile = 5, | 21 AfterCompile = 5, |
| 22 CompileError = 6, | 22 CompileError = 6, |
| 23 AsyncTaskEvent = 7, | 23 AsyncTaskEvent = 7, |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 enum ExceptionBreakState { | |
| 27 NoBreakOnException = 0, | |
| 28 BreakOnUncaughtException = 1, | |
| 29 BreakOnAnyException = 2 | |
| 30 }; | |
| 31 | |
| 26 class V8_EXPORT Debug { | 32 class V8_EXPORT Debug { |
| 27 public: | 33 public: |
| 28 /** | 34 /** |
| 29 * A client object passed to the v8 debugger whose ownership will be taken by | 35 * A client object passed to the v8 debugger whose ownership will be taken by |
| 30 * it. v8 is always responsible for deleting the object. | 36 * it. v8 is always responsible for deleting the object. |
| 31 */ | 37 */ |
| 32 class ClientData { | 38 class ClientData { |
| 33 public: | 39 public: |
| 34 virtual ~ClientData() {} | 40 virtual ~ClientData() {} |
| 35 }; | 41 }; |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 268 static MaybeLocal<Array> GetInternalProperties(Isolate* isolate, | 274 static MaybeLocal<Array> GetInternalProperties(Isolate* isolate, |
| 269 Local<Value> value); | 275 Local<Value> value); |
| 270 | 276 |
| 271 /** | 277 /** |
| 272 * Defines if the ES2015 tail call elimination feature is enabled or not. | 278 * Defines if the ES2015 tail call elimination feature is enabled or not. |
| 273 * The change of this flag triggers deoptimization of all functions that | 279 * The change of this flag triggers deoptimization of all functions that |
| 274 * contain calls at tail position. | 280 * contain calls at tail position. |
| 275 */ | 281 */ |
| 276 static bool IsTailCallEliminationEnabled(Isolate* isolate); | 282 static bool IsTailCallEliminationEnabled(Isolate* isolate); |
| 277 static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); | 283 static void SetTailCallEliminationEnabled(Isolate* isolate, bool enabled); |
| 284 | |
| 285 /** | |
| 286 * Defines if VM will pause on exceptions or not. | |
| 287 * If BreakOnAnyExceptions is set then VM will pause on caught and uncaught | |
| 288 * exception, if BreakOnUncaughtException is set then VM will pause only on | |
| 289 * uncaught exception, otherwise VM won't stop on any exception. | |
| 290 */ | |
| 291 static void ChangeBreakOnException(Isolate* isolate, | |
|
dgozman
2016/10/06 21:48:43
I wonder whether we want new public C++ api for de
Yang
2016/10/07 14:05:55
The idea that I have, but not really communicated
| |
| 292 ExceptionBreakState state); | |
| 278 }; | 293 }; |
| 279 | 294 |
| 280 | 295 |
| 281 } // namespace v8 | 296 } // namespace v8 |
| 282 | 297 |
| 283 | 298 |
| 284 #undef EXPORT | 299 #undef EXPORT |
| 285 | 300 |
| 286 | 301 |
| 287 #endif // V8_V8_DEBUG_H_ | 302 #endif // V8_V8_DEBUG_H_ |
| OLD | NEW |