Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index f53e9103fc8c6b78265ee6b302ee2bf7666e2303..5feb48eeff19f00c404e55603d357a9722a4b8fa 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -519,7 +519,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) { |
@@ -554,7 +554,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(); |
} |
@@ -819,8 +819,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 = |
@@ -1137,19 +1137,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"); |
} |