Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Unified Diff: src/debug-delay.js

Issue 13785: Give an error when setting break points in functions either defined through t... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « no previous file | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698