Chromium Code Reviews| 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..e6236a44824ecfb94bc99c36c4323a8d3f70dfbc 100644 |
| --- a/test/cctest/test-cpu-profiler.cc |
| +++ b/test/cctest/test-cpu-profiler.cc |
| @@ -1780,3 +1780,22 @@ 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; |
| + v8::HandleScope scope(CcTest::isolate()); |
| + v8::Local<v8::Context> env = CcTest::NewContext(PROFILER_EXTENSION); |
|
yurys
2015/02/19 09:13:52
This line can be removed.
|
| + v8::Context::Scope context_scope(env); |
| + |
| + printf("--------------start--------------\n"); |
|
yurys
2015/02/19 09:13:52
And this.
|
| + const char* source = |
| + "function CompareStatementWithThis() {\n" |
| + " if (this === 1) {\n" |
| + " }\n" |
| + "}\n" |
| + "CompareStatementWithThis();\n"; |
| + |
| + v8::Script::Compile(v8_str(source))->Run(); |
| +} |