Index: test/mjsunit/debug-scopes.js |
diff --git a/test/mjsunit/debug-scopes.js b/test/mjsunit/debug-scopes.js |
index 1c23b0bf998e777334d9d767bdc860c601e855e6..20fff6775111e64800d3c1a719764037af3b67bc 100644 |
--- a/test/mjsunit/debug-scopes.js |
+++ b/test/mjsunit/debug-scopes.js |
@@ -439,6 +439,26 @@ with(with_object) { |
EndTest(); |
+// With block in function that is marked for optimization while being executed. |
+BeginTest("With 7"); |
+ |
+function with_7() { |
+ with({}) { |
+ %OptimizeFunctionOnNextCall(with_7); |
+ debugger; |
+ } |
+} |
+ |
+listener_delegate = function(exec_state) { |
+ CheckScopeChain([debug.ScopeType.With, |
+ debug.ScopeType.Local, |
+ debug.ScopeType.Global], exec_state); |
+ CheckScopeContent({}, 0, exec_state); |
+}; |
+with_7(); |
+EndTest(); |
+ |
+ |
// Simple closure formed by returning an inner function referering the outer |
// functions arguments. |
BeginTest("Closure 1"); |
@@ -950,6 +970,28 @@ try { |
EndTest(); |
+// Catch block in function that is marked for optimization while being executed. |
+BeginTest("Catch block 7"); |
+function catch_block_7() { |
+ %OptimizeFunctionOnNextCall(catch_block_7); |
+ try { |
+ throw 'Exception'; |
+ } catch (e) { |
+ debugger; |
+ } |
+}; |
+ |
+ |
+listener_delegate = function(exec_state) { |
+ CheckScopeChain([debug.ScopeType.Catch, |
+ debug.ScopeType.Local, |
+ debug.ScopeType.Global], exec_state); |
+ CheckScopeContent({e:'Exception'}, 0, exec_state); |
+}; |
+catch_block_7(); |
+EndTest(); |
+ |
+ |
assertEquals(begin_test_count, break_count, |
'one or more tests did not enter the debugger'); |
assertEquals(begin_test_count, end_test_count, |