Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 1b031f8a937559306d048d616e59f9955170ce2e..ca396278efbb4b99dbdb45e334454c502e7752c1 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1377,17 +1377,6 @@ Handle<JSMessageObject> Isolate::CreateMessage(Handle<Object> exception, |
location = &potential_computed_location; |
} |
- // If the exception argument is a custom object, turn it into a string |
- // before throwing as uncaught exception. Note that the pending |
- // exception object to be set later must not be turned into a string. |
- if (exception->IsJSObject() && !IsErrorObject(exception)) { |
- MaybeHandle<Object> maybe_exception = |
- Execution::ToDetailString(this, exception); |
- if (!maybe_exception.ToHandle(&exception)) { |
- exception = |
- factory()->InternalizeOneByteString(STATIC_CHAR_VECTOR("exception")); |
- } |
- } |
return MessageHandler::MakeMessageObject( |
this, MessageTemplate::kUncaughtException, location, exception, |
stack_trace_object); |