| Index: src/isolate.cc
|
| diff --git a/src/isolate.cc b/src/isolate.cc
|
| index 7f7670ec2884d5c526e5b9b391dc49e49b88e7cb..865f5affa5a49143104d9c69fb5aa28085502dcf 100644
|
| --- a/src/isolate.cc
|
| +++ b/src/isolate.cc
|
| @@ -908,6 +908,15 @@ void Isolate::RestorePendingMessageFromTryCatch(v8::TryCatch* handler) {
|
| }
|
|
|
|
|
| +void Isolate::CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler) {
|
| + ASSERT(has_scheduled_exception());
|
| + if (scheduled_exception() == handler->exception_) {
|
| + ASSERT(scheduled_exception() != heap()->termination_exception());
|
| + clear_scheduled_exception();
|
| + }
|
| +}
|
| +
|
| +
|
| Object* Isolate::PromoteScheduledException() {
|
| Object* thrown = scheduled_exception();
|
| clear_scheduled_exception();
|
| @@ -1195,8 +1204,7 @@ void Isolate::ReportPendingMessages() {
|
| PropagatePendingExceptionToExternalTryCatch();
|
|
|
| HandleScope scope(this);
|
| - if (thread_local_top_.pending_exception_ ==
|
| - heap()->termination_exception()) {
|
| + if (thread_local_top_.pending_exception_ == heap()->termination_exception()) {
|
| // Do nothing: if needed, the exception has been already propagated to
|
| // v8::TryCatch.
|
| } else {
|
| @@ -1733,8 +1741,7 @@ void Isolate::PropagatePendingExceptionToExternalTryCatch() {
|
|
|
| if (!external_caught) return;
|
|
|
| - if (thread_local_top_.pending_exception_ ==
|
| - heap()->termination_exception()) {
|
| + if (thread_local_top_.pending_exception_ == heap()->termination_exception()) {
|
| try_catch_handler()->can_continue_ = false;
|
| try_catch_handler()->has_terminated_ = true;
|
| try_catch_handler()->exception_ = heap()->null_value();
|
|
|