Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(392)

Unified Diff: test/cctest/test-cpu-profiler.cc

Issue 186723005: New Compilation API, part 1 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: . Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-cpu-profiler.cc
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc
index 3bba514391009549325e8b83dc244bf3fa0743fb..ed0b190f93e8d5f27d99745eaaa6a0331479db64 100644
--- a/test/cctest/test-cpu-profiler.cc
+++ b/test/cctest/test-cpu-profiler.cc
@@ -1495,20 +1495,16 @@ TEST(FunctionDetails) {
v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION);
v8::Context::Scope context_scope(env);
- v8::Handle<v8::Script> script_a = v8::Script::Compile(
- v8::String::NewFromUtf8(
- env->GetIsolate(),
+ v8::Handle<v8::Script> script_a = CompileWithOrigin(
" function foo\n() { try { bar(); } catch(e) {} }\n"
- " function bar() { startProfiling(); }\n"),
- v8::String::NewFromUtf8(env->GetIsolate(), "script_a"));
+ " function bar() { startProfiling(); }\n",
+ "script_a");
script_a->Run();
- v8::Handle<v8::Script> script_b = v8::Script::Compile(
- v8::String::NewFromUtf8(
- env->GetIsolate(),
+ v8::Handle<v8::Script> script_b = CompileWithOrigin(
"\n\n function baz() { try { foo(); } catch(e) {} }\n"
"\n\nbaz();\n"
- "stopProfiling();\n"),
- v8::String::NewFromUtf8(env->GetIsolate(), "script_b"));
+ "stopProfiling();\n",
+ "script_b");
script_b->Run();
const v8::CpuProfile* profile = i::ProfilerExtension::last_profile;
const v8::CpuProfileNode* current = profile->GetTopDownRoot();
« no previous file with comments | « test/cctest/test-api.cc ('k') | test/cctest/test-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698