vendor/v8/test/mjsunit/regress/regress-1639.js in libv8-3.10.8.0 vs vendor/v8/test/mjsunit/regress/regress-1639.js in libv8-3.11.8.0

- old
+ new

@@ -1,6 +1,6 @@ -// Copyright 2011 the V8 project authors. All rights reserved. +// Copyright 2012 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright @@ -27,10 +27,11 @@ // Flags: --expose-debug-as debug // Get the Debug object exposed from the debug context global object. Debug = debug.Debug var breaks = 0; +var exception = false; function sendCommand(state, cmd) { // Get the debug command processor in paused state. var dcp = state.debugCommandProcessor(false); var request = JSON.stringify(cmd); @@ -45,19 +46,22 @@ assertEquals(-1, line.indexOf('NOBREAK'), "should not break on unexpected lines") assertEquals('BREAK ' + breaks, line.substr(-7)); breaks++; - sendCommand(exec_state, { - seq: 0, - type: "request", - command: "continue", - arguments: { stepaction: "next" } - }); + if (breaks < 4) { + sendCommand(exec_state, { + seq: 0, + type: "request", + command: "continue", + arguments: { stepaction: "next" } + }); + } } } catch (e) { print(e); + exception = true; } } // Add the debug event listener. Debug.setListener(listener); @@ -80,6 +84,8 @@ } // Set a break point and call to invoke the debug event listener. Debug.setBreakPoint(b, 0, 0); a(b); -// BREAK 3 +a(); // BREAK 3 + +assertFalse(exception);