Revision: 24152
Author: [email protected]
Date: Tue Sep 23 14:29:45 2014 UTC
Log: Preserve message when rethrowing exception
A new message was always generated if there is a the top-most verbose
TryCatch, even when rethrowing an exception from a TryCatch that is going
out of scope, and we already have a message.
BUG=v8:3583
LOG=Y
[email protected]
Review URL: https://codereview.chromium.org/587703002
Patch from Jens Widell <[email protected]>.
https://code.google.com/p/v8/source/detail?r=24152
Modified:
/branches/bleeding_edge/src/isolate.cc
=======================================
--- /branches/bleeding_edge/src/isolate.cc Fri Sep 19 08:01:35 2014 UTC
+++ /branches/bleeding_edge/src/isolate.cc Tue Sep 23 14:29:45 2014 UTC
@@ -1019,9 +1019,9 @@
ShouldReportException(&can_be_caught_externally,
catchable_by_javascript);
bool report_exception = catchable_by_javascript &&
should_report_exception;
bool try_catch_needs_message =
- can_be_caught_externally && try_catch_handler()->capture_message_ &&
- !thread_local_top()->rethrowing_message_;
+ can_be_caught_externally && try_catch_handler()->capture_message_;
bool bootstrapping = bootstrapper()->IsActive();
+ bool rethrowing_message = thread_local_top()->rethrowing_message_;
thread_local_top()->rethrowing_message_ = false;
@@ -1031,7 +1031,7 @@
}
// Generate the message if required.
- if (report_exception || try_catch_needs_message) {
+ if (!rethrowing_message && (report_exception ||
try_catch_needs_message)) {
MessageLocation potential_computed_location;
if (location == NULL) {
// If no location was specified we use a computed one instead.
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.