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 "include/v8-debug.h" | 8 #include "include/v8-debug.h" |
9 #include "src/allocation.h" | 9 #include "src/allocation.h" |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); | 771 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); |
772 // Un-schedule an exception that was caught by a TryCatch handler. | 772 // Un-schedule an exception that was caught by a TryCatch handler. |
773 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); | 773 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); |
774 void ReportPendingMessages(); | 774 void ReportPendingMessages(); |
775 // Return pending location if any or unfilled structure. | 775 // Return pending location if any or unfilled structure. |
776 MessageLocation GetMessageLocation(); | 776 MessageLocation GetMessageLocation(); |
777 Object* ThrowIllegalOperation(); | 777 Object* ThrowIllegalOperation(); |
778 | 778 |
779 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. | 779 // Promote a scheduled exception to pending. Asserts has_scheduled_exception. |
780 Object* PromoteScheduledException(); | 780 Object* PromoteScheduledException(); |
| 781 |
| 782 Handle<JSMessageObject> CreateMessage( |
| 783 Handle<Object> exception, MessageLocation* location, |
| 784 Handle<JSObject> promise = Handle<JSObject>()); |
| 785 |
781 void DoThrow(Object* exception, MessageLocation* location); | 786 void DoThrow(Object* exception, MessageLocation* location); |
782 // Checks if exception should be reported and finds out if it's | 787 // Checks if exception should be reported and finds out if it's |
783 // caught externally. | 788 // caught externally. |
784 bool ShouldReportException(bool* can_be_caught_externally, | 789 bool ShouldReportException(bool* can_be_caught_externally, |
785 bool catchable_by_javascript); | 790 bool catchable_by_javascript); |
786 | 791 |
| 792 void ReportPromiseReject(Handle<JSObject> promise, Handle<Object> exception, |
| 793 MessageLocation* location); |
| 794 |
787 // Attempts to compute the current source location, storing the | 795 // Attempts to compute the current source location, storing the |
788 // result in the target out parameter. | 796 // result in the target out parameter. |
789 void ComputeLocation(MessageLocation* target); | 797 void ComputeLocation(MessageLocation* target); |
790 | 798 |
791 // Out of resource exception helpers. | 799 // Out of resource exception helpers. |
792 Object* StackOverflow(); | 800 Object* StackOverflow(); |
793 Object* TerminateExecution(); | 801 Object* TerminateExecution(); |
794 void CancelTerminateExecution(); | 802 void CancelTerminateExecution(); |
795 | 803 |
796 void InvokeApiInterruptCallback(); | 804 void InvokeApiInterruptCallback(); |
(...skipping 752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1549 } | 1557 } |
1550 | 1558 |
1551 EmbeddedVector<char, 128> filename_; | 1559 EmbeddedVector<char, 128> filename_; |
1552 FILE* file_; | 1560 FILE* file_; |
1553 int scope_depth_; | 1561 int scope_depth_; |
1554 }; | 1562 }; |
1555 | 1563 |
1556 } } // namespace v8::internal | 1564 } } // namespace v8::internal |
1557 | 1565 |
1558 #endif // V8_ISOLATE_H_ | 1566 #endif // V8_ISOLATE_H_ |
OLD | NEW |