Commit 578a2c74 authored by yangguo@chromium.org's avatar yangguo@chromium.org

Fix details in message formatting.

BUG=

Review URL: https://chromiumcodereview.appspot.com/11360220

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12940 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent c6b35d03
......@@ -1235,7 +1235,7 @@ void Isolate::DoThrow(Object* exception, MessageLocation* location) {
// exception object to be set later must not be turned into a string.
if (exception_arg->IsJSObject() && !IsErrorObject(exception_arg)) {
bool failed = false;
exception_arg = Execution::ToString(exception_arg, &failed);
exception_arg = Execution::ToDetailString(exception_arg, &failed);
if (failed) {
exception_arg = factory()->LookupAsciiSymbol("exception");
}
......
......@@ -190,6 +190,7 @@ function NoSideEffectToString(obj) {
if (IS_BOOLEAN(obj)) return x ? 'true' : 'false';
if (IS_UNDEFINED(obj)) return 'undefined';
if (IS_NULL(obj)) return 'null';
if (IS_FUNCTION(obj)) return %_CallFunction(obj, FunctionToString);
if (IS_OBJECT(obj) && %GetDataProperty(obj, "toString") === ObjectToString) {
var constructor = obj.constructor;
if (typeof constructor == "function") {
......
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