Index: src/log.cc |
diff --git a/src/log.cc b/src/log.cc |
index e95b96332e6798e17f88fc8bbb19e62ad5f3a557..7de63d57f4a483157b069ea916768130452d313c 100644 |
--- a/src/log.cc |
+++ b/src/log.cc |
@@ -1654,17 +1654,16 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, |
Handle<String> func_name(shared->DebugName()); |
if (shared->script()->IsScript()) { |
Handle<Script> script(Script::cast(shared->script())); |
+ int line_num = GetScriptLineNumber(script, shared->start_position()); |
if (script->name()->IsString()) { |
Handle<String> script_name(String::cast(script->name())); |
- int line_num = GetScriptLineNumber(script, shared->start_position()); |
- if (line_num > 0) { |
+ if (line_num >= 0) { |
PROFILE(isolate_, |
CodeCreateEvent( |
Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script), |
*code, *shared, NULL, |
*script_name, line_num + 1)); |
} else { |
- // Can't distinguish eval and script here, so always use Script. |
yurys
2013/07/05 13:10:00
Revert this line?
loislo
2013/07/05 13:15:37
Done.
|
PROFILE(isolate_, |
CodeCreateEvent( |
Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
@@ -1674,7 +1673,8 @@ void Logger::LogExistingFunction(Handle<SharedFunctionInfo> shared, |
PROFILE(isolate_, |
CodeCreateEvent( |
Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script), |
- *code, *shared, NULL, *func_name)); |
+ *code, *shared, NULL, |
+ isolate_->heap()->empty_string(), line_num + 1)); |
yurys
2013/07/05 13:10:00
You can do line_num = line_num + 1 once outside if
loislo
2013/07/05 13:15:37
Done.
|
} |
} else if (shared->IsApiFunction()) { |
// API function. |