| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/isolate.h" | 5 #include "src/isolate.h" |
| 6 | 6 |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include <fstream> // NOLINT(readability/streams) | 9 #include <fstream> // NOLINT(readability/streams) |
| 10 #include <sstream> | 10 #include <sstream> |
| (...skipping 1675 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1686 // external handler which is on top of the top-most JS_ENTRY handler. | 1686 // external handler which is on top of the top-most JS_ENTRY handler. |
| 1687 // | 1687 // |
| 1688 // Note, that finally clauses would re-throw an exception unless it's aborted | 1688 // Note, that finally clauses would re-throw an exception unless it's aborted |
| 1689 // by jumps in control flow (like return, break, etc.) and we'll have another | 1689 // by jumps in control flow (like return, break, etc.) and we'll have another |
| 1690 // chance to set proper v8::TryCatch later. | 1690 // chance to set proper v8::TryCatch later. |
| 1691 return (entry_handler > external_handler); | 1691 return (entry_handler > external_handler); |
| 1692 } | 1692 } |
| 1693 | 1693 |
| 1694 | 1694 |
| 1695 void Isolate::ReportPendingMessages() { | 1695 void Isolate::ReportPendingMessages() { |
| 1696 DCHECK(AllowExceptions::IsAllowed(this)); |
| 1697 |
| 1696 Object* exception = pending_exception(); | 1698 Object* exception = pending_exception(); |
| 1697 | 1699 |
| 1698 // Try to propagate the exception to an external v8::TryCatch handler. If | 1700 // Try to propagate the exception to an external v8::TryCatch handler. If |
| 1699 // propagation was unsuccessful, then we will get another chance at reporting | 1701 // propagation was unsuccessful, then we will get another chance at reporting |
| 1700 // the pending message if the exception is re-thrown. | 1702 // the pending message if the exception is re-thrown. |
| 1701 bool has_been_propagated = PropagatePendingExceptionToExternalTryCatch(); | 1703 bool has_been_propagated = PropagatePendingExceptionToExternalTryCatch(); |
| 1702 if (!has_been_propagated) return; | 1704 if (!has_been_propagated) return; |
| 1703 | 1705 |
| 1704 // Clear the pending message object early to avoid endless recursion. | 1706 // Clear the pending message object early to avoid endless recursion. |
| 1705 Object* message_obj = thread_local_top_.pending_message_obj_; | 1707 Object* message_obj = thread_local_top_.pending_message_obj_; |
| (...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3651 // Then check whether this scope intercepts. | 3653 // Then check whether this scope intercepts. |
| 3652 if ((flag & intercept_mask_)) { | 3654 if ((flag & intercept_mask_)) { |
| 3653 intercepted_flags_ |= flag; | 3655 intercepted_flags_ |= flag; |
| 3654 return true; | 3656 return true; |
| 3655 } | 3657 } |
| 3656 return false; | 3658 return false; |
| 3657 } | 3659 } |
| 3658 | 3660 |
| 3659 } // namespace internal | 3661 } // namespace internal |
| 3660 } // namespace v8 | 3662 } // namespace v8 |
| OLD | NEW |