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

Unified Diff: test/cctest/test-profile-generator.cc

Issue 1213113007: Prepare profiler test for try-catch being optimizable. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-profile-generator.cc
diff --git a/test/cctest/test-profile-generator.cc b/test/cctest/test-profile-generator.cc
index 0a2c7a562576d3c25092a3c180904616683e0690..221761487c28fd84a739ce43ba3a2489fcfdd6af 100644
--- a/test/cctest/test-profile-generator.cc
+++ b/test/cctest/test-profile-generator.cc
@@ -681,14 +681,13 @@ TEST(BailoutReason) {
CHECK_EQ(0, iprofiler->GetProfilesCount());
v8::Handle<v8::Script> script =
v8::Script::Compile(v8::String::NewFromUtf8(env->GetIsolate(),
- "function TryCatch() {\n"
- " try {\n"
- " startProfiling();\n"
- " } catch (e) { };\n"
+ "function Debugger() {\n"
+ " debugger;\n"
+ " startProfiling();\n"
"}\n"
"function TryFinally() {\n"
" try {\n"
- " TryCatch();\n"
+ " Debugger();\n"
" } finally { };\n"
"}\n"
"TryFinally();\n"
@@ -703,8 +702,8 @@ TEST(BailoutReason) {
// The tree should look like this:
// (root)
// ""
- // kTryFinally
- // kTryCatch
+ // kTryFinallyStatement
+ // kDebuggerStatement
current = PickChild(current, "");
CHECK(const_cast<v8::CpuProfileNode*>(current));
@@ -712,7 +711,7 @@ TEST(BailoutReason) {
CHECK(const_cast<v8::CpuProfileNode*>(current));
CHECK(!strcmp("TryFinallyStatement", current->GetBailoutReason()));
- current = PickChild(current, "TryCatch");
+ current = PickChild(current, "Debugger");
CHECK(const_cast<v8::CpuProfileNode*>(current));
- CHECK(!strcmp("TryCatchStatement", current->GetBailoutReason()));
+ CHECK(!strcmp("DebuggerStatement", current->GetBailoutReason()));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698