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 #include <set> | 10 #include <set> |
(...skipping 716 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 // Re-throw an exception. This involves no error reporting since error | 727 // Re-throw an exception. This involves no error reporting since error |
728 // reporting was handled when the exception was thrown originally. | 728 // reporting was handled when the exception was thrown originally. |
729 Object* ReThrow(Object* exception); | 729 Object* ReThrow(Object* exception); |
730 | 730 |
731 // Find the correct handler for the current pending exception. This also | 731 // Find the correct handler for the current pending exception. This also |
732 // clears and returns the current pending exception. | 732 // clears and returns the current pending exception. |
733 Object* UnwindAndFindHandler(); | 733 Object* UnwindAndFindHandler(); |
734 | 734 |
735 // Tries to predict whether an exception will be caught. Note that this can | 735 // Tries to predict whether an exception will be caught. Note that this can |
736 // only produce an estimate, because it is undecidable whether a finally | 736 // only produce an estimate, because it is undecidable whether a finally |
737 // clause will consume or re-throw an exception. We conservatively assume any | 737 // clause will consume or re-throw an exception. |
738 // finally clause will behave as if the exception were consumed. | |
739 enum CatchType { NOT_CAUGHT, CAUGHT_BY_JAVASCRIPT, CAUGHT_BY_EXTERNAL }; | 738 enum CatchType { NOT_CAUGHT, CAUGHT_BY_JAVASCRIPT, CAUGHT_BY_EXTERNAL }; |
740 CatchType PredictExceptionCatcher(); | 739 CatchType PredictExceptionCatcher(); |
741 | 740 |
742 void ScheduleThrow(Object* exception); | 741 void ScheduleThrow(Object* exception); |
743 // Re-set pending message, script and positions reported to the TryCatch | 742 // Re-set pending message, script and positions reported to the TryCatch |
744 // back to the TLS for re-use when rethrowing. | 743 // back to the TLS for re-use when rethrowing. |
745 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); | 744 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); |
746 // Un-schedule an exception that was caught by a TryCatch handler. | 745 // Un-schedule an exception that was caught by a TryCatch handler. |
747 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); | 746 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); |
748 void ReportPendingMessages(); | 747 void ReportPendingMessages(); |
(...skipping 893 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1642 | 1641 |
1643 EmbeddedVector<char, 128> filename_; | 1642 EmbeddedVector<char, 128> filename_; |
1644 FILE* file_; | 1643 FILE* file_; |
1645 int scope_depth_; | 1644 int scope_depth_; |
1646 }; | 1645 }; |
1647 | 1646 |
1648 } // namespace internal | 1647 } // namespace internal |
1649 } // namespace v8 | 1648 } // namespace v8 |
1650 | 1649 |
1651 #endif // V8_ISOLATE_H_ | 1650 #endif // V8_ISOLATE_H_ |
OLD | NEW |