Eliminate double offsetting of line numbers in profiler.

I didn't noticed that in r1481 GetScriptLineNumber was changed to perform line numbers offsetting by itself.

Review URL: http://codereview.chromium.org/131102


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@2227 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent e2a01ed4
......@@ -380,10 +380,7 @@ bool Compiler::CompileLazy(Handle<SharedFunctionInfo> shared,
Handle<String> func_name(name->length() > 0 ?
*name : shared->inferred_name());
if (script->name()->IsString()) {
int line_num = GetScriptLineNumber(script, start_position);
if (line_num > 0) {
line_num += script->line_offset()->value() + 1;
}
int line_num = GetScriptLineNumber(script, start_position) + 1;
LOG(CodeCreateEvent(Logger::LAZY_COMPILE_TAG, *code, *func_name,
String::cast(script->name()), line_num));
OProfileAgent::CreateNativeCodeRegion(*func_name,
......
......@@ -1026,10 +1026,9 @@ void Logger::LogCompiledFunctions() {
Handle<String> script_name(String::cast(script->name()));
int line_num = GetScriptLineNumber(script, shared->start_position());
if (line_num > 0) {
line_num += script->line_offset()->value() + 1;
LOG(CodeCreateEvent(Logger::LAZY_COMPILE_TAG,
shared->code(), *func_name,
*script_name, line_num));
*script_name, line_num + 1));
} else {
// Can't distinguish enum and script here, so always use Script.
LOG(CodeCreateEvent(Logger::SCRIPT_TAG,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment