Index: test/cctest/test-cpu-profiler.cc |
diff --git a/test/cctest/test-cpu-profiler.cc b/test/cctest/test-cpu-profiler.cc |
index d54aefa7aebb75733dffe969bfd86650be7c6e25..e2b6db0b963f673853e249caeda5e327c7f7d18a 100644 |
--- a/test/cctest/test-cpu-profiler.cc |
+++ b/test/cctest/test-cpu-profiler.cc |
@@ -1780,3 +1780,19 @@ TEST(CollectDeoptEvents) { |
iopt_function->deopt_infos()[1].deopt_reason); |
iprofiler->DeleteProfile(iprofile); |
} |
+ |
+ |
+TEST(SourceLocation) { |
+ i::FLAG_always_opt = true; |
+ i::FLAG_hydrogen_track_positions = true; |
+ LocalContext env; |
+ v8::HandleScope scope(CcTest::isolate()); |
+ |
+ const char* source = |
+ "function CompareStatementWithThis() {\n" |
+ " if (this === 1) {}\n" |
+ "}\n" |
+ "CompareStatementWithThis();\n"; |
+ |
+ v8::Script::Compile(v8_str(source))->Run(); |
+} |