Index: test/mjsunit/debug-evaluate-locals-optimized.js |
diff --git a/test/mjsunit/debug-evaluate-locals-optimized.js b/test/mjsunit/debug-evaluate-locals-optimized.js |
index 7a77c0d32a55bf62f2707eed922ba6331dc6254f..1aaf29633c321f43548cc1be749768e0f1b89f7c 100644 |
--- a/test/mjsunit/debug-evaluate-locals-optimized.js |
+++ b/test/mjsunit/debug-evaluate-locals-optimized.js |
@@ -29,8 +29,10 @@ |
// Get the Debug object exposed from the debug context global object. |
Debug = debug.Debug |
-listenerComplete = false; |
-exception = false; |
+var listenerComplete = false; |
+var exception = false; |
+ |
+var testingConstructCall = false; |
function listener(event, exec_state, event_data, data) { |
@@ -66,6 +68,9 @@ function listener(event, exec_state, event_data, data) { |
default: assertUnreachable(); |
} |
+ // Check for construct call. |
+ assertEquals(testingConstructCall && i == 4, frame.isConstructCall()); |
+ |
// When function f is optimized (2 means YES, see runtime.cc) we |
// expect an optimized frame for f with g1, g2 and g3 inlined. |
if (%GetOptimizationStatus(f) == 2) { |
@@ -127,7 +132,10 @@ function f(x, y) { |
g1(a, b); |
}; |
+// Test calling f normally and as a constructor. |
f(11, 12); |
+testingConstructCall = true; |
+new f(11, 12); |
// Make sure that the debug event listener vas invoked. |
assertFalse(exception, "exception in listener " + exception) |