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

Unified Diff: src/isolate.cc

Issue 1157563005: Do not eagerly convert exception to string when creating a message object (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: small change Created 5 years, 7 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/debug.cc ('k') | src/messages.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 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);
« no previous file with comments | « src/debug.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698