Output the correct line number in the error message for compilation failures during bootstrapping
BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10735024 Patch from Jochen Eisinger <jochen@chromium.org>. git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12026 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
c74871f37b
commit
9ecff25a79
@ -246,7 +246,7 @@ Handle<FixedArray> AddKeysFromJSArray(Handle<FixedArray>,
|
|||||||
// if none exists.
|
// if none exists.
|
||||||
Handle<JSValue> GetScriptWrapper(Handle<Script> script);
|
Handle<JSValue> GetScriptWrapper(Handle<Script> script);
|
||||||
|
|
||||||
// Script line number computations.
|
// Script line number computations. Note that the line number is zero-based.
|
||||||
void InitScriptLineEnds(Handle<Script> script);
|
void InitScriptLineEnds(Handle<Script> script);
|
||||||
// For string calculates an array of line end positions. If the string
|
// For string calculates an array of line end positions. If the string
|
||||||
// does not end with a new line character, this character may optionally be
|
// does not end with a new line character, this character may optionally be
|
||||||
|
@ -1136,12 +1136,12 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
|
|||||||
"Extension or internal compilation error: %s in %s at line %d.\n",
|
"Extension or internal compilation error: %s in %s at line %d.\n",
|
||||||
*String::cast(exception)->ToCString(),
|
*String::cast(exception)->ToCString(),
|
||||||
*String::cast(location->script()->name())->ToCString(),
|
*String::cast(location->script()->name())->ToCString(),
|
||||||
line_number);
|
line_number + 1);
|
||||||
} else {
|
} else {
|
||||||
OS::PrintError(
|
OS::PrintError(
|
||||||
"Extension or internal compilation error in %s at line %d.\n",
|
"Extension or internal compilation error in %s at line %d.\n",
|
||||||
*String::cast(location->script()->name())->ToCString(),
|
*String::cast(location->script()->name())->ToCString(),
|
||||||
line_number);
|
line_number + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user