Commit 5c7fd0e5 authored by kasperl@chromium.org's avatar kasperl@chromium.org

Fix weird issue with test case where certain global function

names were being reused.
Review URL: http://codereview.chromium.org/669148

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4028 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 61d2ebde
...@@ -84,16 +84,16 @@ function CheckScopeChain(scopes, exec_state) { ...@@ -84,16 +84,16 @@ function CheckScopeChain(scopes, exec_state) {
var scope = exec_state.frame().scope(i); var scope = exec_state.frame().scope(i);
assertTrue(scope.isScope()); assertTrue(scope.isScope());
assertEquals(scopes[i], scope.scopeType()); assertEquals(scopes[i], scope.scopeType());
// Check the global object when hitting the global scope. // Check the global object when hitting the global scope.
if (scopes[i] == debug.ScopeType.Global) { if (scopes[i] == debug.ScopeType.Global) {
assertEquals(this, scope.scopeObject().value()); assertEquals(this, scope.scopeObject().value());
} }
} }
// Get the debug command processor. // Get the debug command processor.
var dcp = exec_state.debugCommandProcessor("unspecified_running_state"); var dcp = exec_state.debugCommandProcessor("unspecified_running_state");
// Send a scopes request and check the result. // Send a scopes request and check the result.
var json; var json;
request_json = '{"seq":0,"type":"request","command":"scopes"}' request_json = '{"seq":0,"type":"request","command":"scopes"}'
...@@ -133,7 +133,7 @@ function CheckScopeContent(content, number, exec_state) { ...@@ -133,7 +133,7 @@ function CheckScopeContent(content, number, exec_state) {
} }
count++; count++;
} }
// 'arguments' and might be exposed in the local and closure scope. Just // 'arguments' and might be exposed in the local and closure scope. Just
// ignore this. // ignore this.
var scope_size = scope.scopeObject().properties().length; var scope_size = scope.scopeObject().properties().length;
...@@ -156,7 +156,7 @@ function CheckScopeContent(content, number, exec_state) { ...@@ -156,7 +156,7 @@ function CheckScopeContent(content, number, exec_state) {
// Get the debug command processor. // Get the debug command processor.
var dcp = exec_state.debugCommandProcessor("unspecified_running_state"); var dcp = exec_state.debugCommandProcessor("unspecified_running_state");
// Send a scope request for information on a single scope and check the // Send a scope request for information on a single scope and check the
// result. // result.
request_json = '{"seq":0,"type":"request","command":"scope","arguments":{"number":' request_json = '{"seq":0,"type":"request","command":"scope","arguments":{"number":'
...@@ -622,7 +622,7 @@ function the_full_monty(a, b) { ...@@ -622,7 +622,7 @@ function the_full_monty(a, b) {
with ({j:13}){ with ({j:13}){
return function() { return function() {
var x = 14; var x = 14;
with ({a:15}) { with ({a:15}) {
with ({b:16}) { with ({b:16}) {
debugger; debugger;
some_global = a; some_global = a;
...@@ -707,7 +707,7 @@ EndTest(); ...@@ -707,7 +707,7 @@ EndTest();
BeginTest("Catch block 3"); BeginTest("Catch block 3");
function catch_block_1() { function catch_block_3() {
// Do eval to dynamically declare a local variable so that the context's // Do eval to dynamically declare a local variable so that the context's
// extension slot is initialized with JSContextExtensionObject. // extension slot is initialized with JSContextExtensionObject.
eval("var y = 78;"); eval("var y = 78;");
...@@ -726,12 +726,12 @@ listener_delegate = function(exec_state) { ...@@ -726,12 +726,12 @@ listener_delegate = function(exec_state) {
CheckScopeContent({e:'Exception'}, 0, exec_state); CheckScopeContent({e:'Exception'}, 0, exec_state);
CheckScopeContent({y:78}, 1, exec_state); CheckScopeContent({y:78}, 1, exec_state);
} }
catch_block_1() catch_block_3()
EndTest(); EndTest();
BeginTest("Catch block 4"); BeginTest("Catch block 4");
function catch_block_2() { function catch_block_4() {
// Do eval to dynamically declare a local variable so that the context's // Do eval to dynamically declare a local variable so that the context's
// extension slot is initialized with JSContextExtensionObject. // extension slot is initialized with JSContextExtensionObject.
eval("var y = 98;"); eval("var y = 98;");
...@@ -753,7 +753,7 @@ listener_delegate = function(exec_state) { ...@@ -753,7 +753,7 @@ listener_delegate = function(exec_state) {
CheckScopeContent({e:'Exception'}, 1, exec_state); CheckScopeContent({e:'Exception'}, 1, exec_state);
CheckScopeContent({y:98}, 2, exec_state); CheckScopeContent({y:98}, 2, exec_state);
} }
catch_block_2() catch_block_4()
EndTest(); EndTest();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment