Commit 65025e46 authored by pfeldman@chromium.org's avatar pfeldman@chromium.org

Fail with out-of-bounds exception upon illegal access to the ExecutionState's frame.

Review URL: http://codereview.chromium.org/1284001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4263 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6a639106
......@@ -778,6 +778,8 @@ ExecutionState.prototype.threadCount = function() {
ExecutionState.prototype.frame = function(opt_index) {
// If no index supplied return the selected frame.
if (opt_index == null) opt_index = this.selected_frame;
if (opt_index < 0 || opt_index >= this.frameCount())
throw new Error('Illegal frame index.');
return new FrameMirror(this.break_id, opt_index);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment