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

Unified Diff: src/isolate.cc

Issue 239113009: Reland "Move functions from handles.cc to where they belong." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: fix Created 6 years, 8 months 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/handles.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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");
}
« no previous file with comments | « src/handles.cc ('k') | src/json-stringifier.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698