Index: test/mjsunit/regress/regress-frame-details-null-receiver.js |
diff --git a/test/mjsunit/regress/regress-147497.js b/test/mjsunit/regress/regress-frame-details-null-receiver.js |
similarity index 78% |
copy from test/mjsunit/regress/regress-147497.js |
copy to test/mjsunit/regress/regress-frame-details-null-receiver.js |
index 92e29d12589984b0cf34a91d7cac3479a04bfbaa..d15ed4d00ae774ad01406855fc42cb8c1dfbcc07 100644 |
--- a/test/mjsunit/regress/regress-147497.js |
+++ b/test/mjsunit/regress/regress-frame-details-null-receiver.js |
@@ -25,21 +25,28 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --expose-debug-as debug |
+// Flags: --expose-debug-as debug --allow-natives-syntax |
Debug = debug.Debug; |
+var listened = false; |
function listener(event, exec_state, event_data, data) { |
- if (event == Debug.DebugEvent.Break) { |
- exec_state.prepareStep(Debug.StepAction.StepNext, 10); |
+ if (event == Debug.DebugEvent.Exception) { |
+ for (var i = 0; i < exec_state.frameCount(); i++) { |
+ print(exec_state.frame(i).receiver()); |
+ print(exec_state.frame(i).func().name()); |
+ } |
} |
-}; |
+ listened = true; |
+} |
Debug.setListener(listener); |
+Debug.setBreakOnException(); |
-var statement = ""; |
-for (var i = 0; i < 1024; i++) statement += "z"; |
-statement = 'with(0)' + statement + '=function foo(){}'; |
+assertThrows(function() { delete null['foo']; }); |
+ |
+Debug.clearBreakOnException(); |
+Debug.setListener(null); |
+ |
+assertTrue(listened); |
-debugger; |
-eval(statement); |