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

Unified Diff: src/debug-delay.js

Issue 14886: Bring toiger up to date with bleeding edge 984. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/toiger/
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 | « src/debug.cc ('k') | src/execution.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 1004)
+++ 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.');
+ }
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) {
@@ -832,10 +840,16 @@
};
+ExceptionEvent.prototype.exception = function() {
+ return this.exception_;
+}
+
+
ExceptionEvent.prototype.uncaught = function() {
return this.uncaught_;
}
+
ExceptionEvent.prototype.func = function() {
return this.exec_state_.frame(0).func();
};
@@ -1322,6 +1336,14 @@
// Get the number of frames.
var total_frames = this.exec_state_.frameCount();
+ // Create simple response if there are no frames.
+ if (total_frames == 0) {
+ response.body = {
+ totalFrames: total_frames
+ }
+ return;
+ }
+
// Default frame range to include in backtrace.
var from_index = 0
var to_index = kDefaultBacktraceLength;
« no previous file with comments | « src/debug.cc ('k') | src/execution.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698