Index: test/cctest/test-debug.cc |
diff --git a/test/cctest/test-debug.cc b/test/cctest/test-debug.cc |
index 9dfabe1e6a51836ba50f0db4debaaf53f5129340..b51cb77246f91fb8ed64d2d0342cb15c01c31dbe 100644 |
--- a/test/cctest/test-debug.cc |
+++ b/test/cctest/test-debug.cc |
@@ -7007,16 +7007,16 @@ TEST(GetMirror) { |
v8::HandleScope scope(isolate); |
v8::Handle<v8::Value> obj = |
v8::Debug::GetMirror(v8::String::NewFromUtf8(isolate, "hodja")); |
- v8::Handle<v8::Function> run_test = |
- v8::Handle<v8::Function>::Cast( |
- v8::ScriptCompiler::CompileUnbound( |
- isolate, |
- v8::ScriptCompiler::Source(v8_str( |
- "function runTest(mirror) {" |
- " return mirror.isString() && (mirror.length() == 5);" |
- "}" |
- "" |
- "runTest;")))->BindToCurrentContext()->Run()); |
+ v8::ScriptCompiler::Source source(v8_str( |
+ "function runTest(mirror) {" |
+ " return mirror.isString() && (mirror.length() == 5);" |
+ "}" |
+ "" |
+ "runTest;")); |
+ v8::Handle<v8::Function> run_test = v8::Handle<v8::Function>::Cast( |
+ v8::ScriptCompiler::CompileUnbound(isolate, &source) |
+ ->BindToCurrentContext() |
+ ->Run()); |
v8::Handle<v8::Value> result = run_test->Call(env->Global(), 1, &obj); |
CHECK(result->IsTrue()); |
} |