Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 91b8e8371fa3a4aedad5d61a2e8d0d65b83a2ea3..c148a1dc537ce56b70ad5ad3537a2d178db020f4 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -531,7 +531,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
if (options & StackTrace::kLineNumber) { |
int script_line_offset = script->line_offset()->value(); |
int position = frames[i].code()->SourcePosition(frames[i].pc()); |
- int line_number = GetScriptLineNumber(script, position); |
+ int line_number = Script::GetLineNumber(script, position); |
// line_number is already shifted by the script_line_offset. |
int relative_line_number = line_number - script_line_offset; |
if (options & StackTrace::kColumnOffset && relative_line_number >= 0) { |
@@ -566,7 +566,7 @@ Handle<JSArray> Isolate::CaptureCurrentStackTrace( |
} |
if (options & StackTrace::kScriptNameOrSourceURL) { |
- Handle<Object> result = GetScriptNameOrSourceURL(script); |
+ Handle<Object> result = Script::GetNameOrSourceURL(script); |
JSObject::SetLocalPropertyIgnoreAttributes( |
stack_frame, script_name_or_source_url_key, result, NONE).Check(); |
} |
@@ -831,8 +831,8 @@ Failure* Isolate::StackOverflow() { |
DoThrow(*exception, NULL); |
// Get stack trace limit. |
- Handle<Object> error = |
- GetProperty(js_builtins_object(), "$Error").ToHandleChecked(); |
+ Handle<Object> error = Object::GetProperty( |
+ this, js_builtins_object(), "$Error").ToHandleChecked(); |
if (!error->IsJSObject()) return Failure::Exception(); |
Handle<String> stackTraceLimit = |
@@ -1149,19 +1149,19 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) { |
// In this case we could have an extension (or an internal error |
// somewhere) and we print out the line number at which the error occured |
// to the console for easier debugging. |
- int line_number = GetScriptLineNumberSafe(location->script(), |
- location->start_pos()); |
+ int line_number = |
+ location->script()->GetLineNumber(location->start_pos()) + 1; |
if (exception->IsString() && location->script()->name()->IsString()) { |
OS::PrintError( |
"Extension or internal compilation error: %s in %s at line %d.\n", |
String::cast(exception)->ToCString().get(), |
String::cast(location->script()->name())->ToCString().get(), |
- line_number + 1); |
+ line_number); |
} else if (location->script()->name()->IsString()) { |
OS::PrintError( |
"Extension or internal compilation error in %s at line %d.\n", |
String::cast(location->script()->name())->ToCString().get(), |
- line_number + 1); |
+ line_number); |
} else { |
OS::PrintError("Extension or internal compilation error.\n"); |
} |