Reviewers: Michail Naganov,

Description:
Experimental bots layout tests fix: handle access to the frame 0 in case there
are no javascript frames on the stack.


Please review this at http://codereview.chromium.org/1284001

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/debug-debugger.js


Index: src/debug-debugger.js
===================================================================
--- src/debug-debugger.js       (revision 4250)
+++ src/debug-debugger.js       (working copy)
@@ -778,6 +778,11 @@
 ExecutionState.prototype.frame = function(opt_index) {
   // If no index supplied return the selected frame.
   if (opt_index == null) opt_index = this.selected_frame;
+
+  // This is a temporary measure necessary until all clients are fixed to
+  // check for frameCount boundaries prior to calling this one.
+  if (opt_index < 0 || opt_index >= this.frameCount()) return undefined;
+
   return new FrameMirror(this.break_id, opt_index);
 };



--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

To unsubscribe from this group, send email to v8-dev+unsubscribegooglegroups.com or reply 
to this email with the words "REMOVE ME" as the subject.

Reply via email to