diff options
| author | Kristian Monsen <kristianm@google.com> | 2010-09-30 15:31:59 +0100 |
|---|---|---|
| committer | Kristian Monsen <kristianm@google.com> | 2010-10-06 14:06:50 +0100 |
| commit | 0d5e116f6aee03185f237311a943491bb079a768 (patch) | |
| tree | e0a80472bc3151e606a32e8d68079579c8143495 /src/debug-debugger.js | |
| parent | 59151504615d929945dc59db37bf1166937748c6 (diff) | |
| download | android_external_v8-0d5e116f6aee03185f237311a943491bb079a768.tar.gz android_external_v8-0d5e116f6aee03185f237311a943491bb079a768.tar.bz2 android_external_v8-0d5e116f6aee03185f237311a943491bb079a768.zip | |
update V8 to r5532 as required by WebKit r68651
Change-Id: I5f75eeffbf64b30dd5080348528d277f293490ad
Diffstat (limited to 'src/debug-debugger.js')
| -rw-r--r-- | src/debug-debugger.js | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/src/debug-debugger.js b/src/debug-debugger.js index 0b02e210..34eb0f0e 100644 --- a/src/debug-debugger.js +++ b/src/debug-debugger.js @@ -45,7 +45,7 @@ Debug.DebugEvent = { Break: 1, ScriptCollected: 6 }; // Types of exceptions that can be broken upon. -Debug.ExceptionBreak = { All : 0, +Debug.ExceptionBreak = { Caught : 0, Uncaught: 1 }; // The different types of steps. @@ -87,7 +87,27 @@ var debugger_flags = { this.value = !!value; %SetDisableBreak(!this.value); } - } + }, + breakOnCaughtException: { + getValue: function() { return Debug.isBreakOnException(); }, + setValue: function(value) { + if (value) { + Debug.setBreakOnException(); + } else { + Debug.clearBreakOnException(); + } + } + }, + breakOnUncaughtException: { + getValue: function() { return Debug.isBreakOnUncaughtException(); }, + setValue: function(value) { + if (value) { + Debug.setBreakOnUncaughtException(); + } else { + Debug.clearBreakOnUncaughtException(); + } + } + }, }; @@ -781,11 +801,15 @@ Debug.clearStepping = function() { } Debug.setBreakOnException = function() { - return %ChangeBreakOnException(Debug.ExceptionBreak.All, true); + return %ChangeBreakOnException(Debug.ExceptionBreak.Caught, true); }; Debug.clearBreakOnException = function() { - return %ChangeBreakOnException(Debug.ExceptionBreak.All, false); + return %ChangeBreakOnException(Debug.ExceptionBreak.Caught, false); +}; + +Debug.isBreakOnException = function() { + return !!%IsBreakOnException(Debug.ExceptionBreak.Caught); }; Debug.setBreakOnUncaughtException = function() { @@ -796,6 +820,10 @@ Debug.clearBreakOnUncaughtException = function() { return %ChangeBreakOnException(Debug.ExceptionBreak.Uncaught, false); }; +Debug.isBreakOnUncaughtException = function() { + return !!%IsBreakOnException(Debug.ExceptionBreak.Uncaught); +}; + Debug.showBreakPoints = function(f, full) { if (!IS_FUNCTION(f)) throw new Error('Parameters have wrong types.'); var source = full ? this.scriptSource(f) : this.source(f); |
