Chromium Code Reviews| Index: src/debug-delay.js |
| =================================================================== |
| --- src/debug-delay.js (revision 969) |
| +++ src/debug-delay.js (working copy) |
| @@ -474,10 +474,18 @@ |
| Debug.setBreakPoint = function(func, opt_line, opt_column, opt_condition) { |
| if (!IS_FUNCTION(func)) throw new Error('Parameters have wrong types.'); |
| + // Break points in API functions are not supported. |
| + if (%FunctionIsAPIFunction(func)) { |
| + throw new Error('Cannot set break point in native code.'); |
|
Christian Plesner Hansen
2008/12/15 09:01:46
Given that all our code is native this error messa
Søren Thygesen Gjesse
2008/12/15 09:29:50
I decided on the error message based on the "toStr
Christian Plesner Hansen
2008/12/15 09:35:29
Good point, let's stay consistent. (I remember fi
|
| + } |
| var source_position = this.findFunctionSourcePosition(func, opt_line, opt_column) - |
| this.sourcePosition(func); |
| // Find the script for the function. |
| var script = %FunctionGetScript(func); |
| + // Break in builtin JavaScript code is not supported. |
| + if (script.type == Debug.ScriptType.Native) { |
| + throw new Error('Cannot set break point in native code.'); |
| + } |
| // If the script for the function has a name convert this to a script break |
| // point. |
| if (script && script.name) { |