Author: [email protected]
Date: Thu Jan 22 00:31:40 2009
New Revision: 1119

Modified:
    branches/bleeding_edge/src/debug-delay.js

Log:
Check for valid frame number when processing the debugger frame request.

BUG=1250705
Review URL: http://codereview.chromium.org/18492

Modified: branches/bleeding_edge/src/debug-delay.js
==============================================================================
--- branches/bleeding_edge/src/debug-delay.js   (original)
+++ branches/bleeding_edge/src/debug-delay.js   Thu Jan 22 00:31:40 2009
@@ -1366,7 +1366,12 @@
    }

    // With no arguments just keep the selected frame.
-  if (request.arguments && request.arguments.number >= 0) {
+  if (request.arguments) {
+    index = request.arguments.number;
+    if (index < 0 || this.exec_state_.frameCount() <= index) {
+      return response.failed('Invalid frame number');
+    }
+
      this.exec_state_.setSelectedFrame(request.arguments.number);
    }
    response.body = this.exec_state_.frame();

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to