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

Unified Diff: src/debug-delay.js

Issue 13382: Add handling of empty stack in the backtrace debug request.... (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 | no next file » | 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 960)
+++ src/debug-delay.js (working copy)
@@ -832,10 +832,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 +1328,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 | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698