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

Unified Diff: src/compiler.cc

Issue 2562973002: [perf-prof] fix crash when logging. (Closed)
Patch Set: remove stray edit Created 4 years 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 | « src/compilation-info.cc ('k') | src/isolate.h » ('j') | src/perf-jit.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler.cc
diff --git a/src/compiler.cc b/src/compiler.cc
index 0cf7459053f4ab35407785071e431653eec68e49..5048844166af3736eed95457bbf2dae95fd5836a 100644
--- a/src/compiler.cc
+++ b/src/compiler.cc
@@ -1301,7 +1301,9 @@ MaybeHandle<JSFunction> Compiler::GetFunctionFromEval(
Handle<Script> script;
if (!maybe_shared_info.ToHandle(&shared_info)) {
script = isolate->factory()->NewScript(source);
- if (FLAG_trace_deopt) Script::InitLineEnds(script);
+ if (isolate->NeedsSourcePositionsForProfiling()) {
+ Script::InitLineEnds(script);
+ }
if (!script_name.is_null()) {
script->set_name(*script_name);
script->set_line_offset(line_offset);
@@ -1461,7 +1463,9 @@ Handle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
// Create a script object describing the script to be compiled.
Handle<Script> script = isolate->factory()->NewScript(source);
- if (FLAG_trace_deopt) Script::InitLineEnds(script);
+ if (isolate->NeedsSourcePositionsForProfiling()) {
+ Script::InitLineEnds(script);
+ }
if (natives == NATIVES_CODE) {
script->set_type(Script::TYPE_NATIVE);
} else if (natives == EXTENSION_CODE) {
« no previous file with comments | « src/compilation-info.cc ('k') | src/isolate.h » ('j') | src/perf-jit.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698