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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <queue> | 9 #include <queue> |
10 | 10 |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 // clears and returns the current pending exception. | 744 // clears and returns the current pending exception. |
745 Object* UnwindAndFindHandler(); | 745 Object* UnwindAndFindHandler(); |
746 | 746 |
747 // Tries to predict whether an exception will be caught. Note that this can | 747 // Tries to predict whether an exception will be caught. Note that this can |
748 // only produce an estimate, because it is undecidable whether a finally | 748 // only produce an estimate, because it is undecidable whether a finally |
749 // clause will consume or re-throw an exception. | 749 // clause will consume or re-throw an exception. |
750 enum CatchType { | 750 enum CatchType { |
751 NOT_CAUGHT, | 751 NOT_CAUGHT, |
752 CAUGHT_BY_JAVASCRIPT, | 752 CAUGHT_BY_JAVASCRIPT, |
753 CAUGHT_BY_EXTERNAL, | 753 CAUGHT_BY_EXTERNAL, |
754 CAUGHT_BY_DESUGARING | 754 CAUGHT_BY_DESUGARING, |
| 755 CAUGHT_BY_PROMISE, |
| 756 CAUGHT_BY_ASYNC_AWAIT |
755 }; | 757 }; |
756 CatchType PredictExceptionCatcher(); | 758 CatchType PredictExceptionCatcher(); |
757 | 759 |
758 void ScheduleThrow(Object* exception); | 760 void ScheduleThrow(Object* exception); |
759 // Re-set pending message, script and positions reported to the TryCatch | 761 // Re-set pending message, script and positions reported to the TryCatch |
760 // back to the TLS for re-use when rethrowing. | 762 // back to the TLS for re-use when rethrowing. |
761 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); | 763 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); |
762 // Un-schedule an exception that was caught by a TryCatch handler. | 764 // Un-schedule an exception that was caught by a TryCatch handler. |
763 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); | 765 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); |
764 void ReportPendingMessages(); | 766 void ReportPendingMessages(); |
(...skipping 906 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 | 1673 |
1672 EmbeddedVector<char, 128> filename_; | 1674 EmbeddedVector<char, 128> filename_; |
1673 FILE* file_; | 1675 FILE* file_; |
1674 int scope_depth_; | 1676 int scope_depth_; |
1675 }; | 1677 }; |
1676 | 1678 |
1677 } // namespace internal | 1679 } // namespace internal |
1678 } // namespace v8 | 1680 } // namespace v8 |
1679 | 1681 |
1680 #endif // V8_ISOLATE_H_ | 1682 #endif // V8_ISOLATE_H_ |
OLD | NEW |