Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: src/isolate.h

Issue 2286753002: Synchronous path changes
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap-symbols.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // This method is called by the api after operations that may throw 666 // This method is called by the api after operations that may throw
667 // exceptions. If an exception was thrown and not handled by an external 667 // exceptions. If an exception was thrown and not handled by an external
668 // handler the exception is scheduled to be rethrown when we return to running 668 // handler the exception is scheduled to be rethrown when we return to running
669 // JavaScript code. If an exception is scheduled true is returned. 669 // JavaScript code. If an exception is scheduled true is returned.
670 bool OptionalRescheduleException(bool is_bottom_call); 670 bool OptionalRescheduleException(bool is_bottom_call);
671 671
672 // Push and pop a promise and the current try-catch handler. 672 // Push and pop a promise and the current try-catch handler.
673 void PushPromise(Handle<JSObject> promise); 673 void PushPromise(Handle<JSObject> promise);
674 void PopPromise(); 674 void PopPromise();
675 Handle<Object> GetPromiseOnStackOnThrow(); 675 Handle<Object> GetPromiseOnStackOnThrow();
676 bool PromiseHasUserDefinedRejectHandler(Handle<JSObject> promise);
676 677
677 class ExceptionScope { 678 class ExceptionScope {
678 public: 679 public:
679 // Scope currently can only be used for regular exceptions, 680 // Scope currently can only be used for regular exceptions,
680 // not termination exception. 681 // not termination exception.
681 inline explicit ExceptionScope(Isolate* isolate); 682 inline explicit ExceptionScope(Isolate* isolate);
682 inline ~ExceptionScope(); 683 inline ~ExceptionScope();
683 684
684 private: 685 private:
685 Isolate* isolate_; 686 Isolate* isolate_;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 // clears and returns the current pending exception. 744 // clears and returns the current pending exception.
744 Object* UnwindAndFindHandler(); 745 Object* UnwindAndFindHandler();
745 746
746 // 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
747 // only produce an estimate, because it is undecidable whether a finally 748 // only produce an estimate, because it is undecidable whether a finally
748 // clause will consume or re-throw an exception. 749 // clause will consume or re-throw an exception.
749 enum CatchType { 750 enum CatchType {
750 NOT_CAUGHT, 751 NOT_CAUGHT,
751 CAUGHT_BY_JAVASCRIPT, 752 CAUGHT_BY_JAVASCRIPT,
752 CAUGHT_BY_EXTERNAL, 753 CAUGHT_BY_EXTERNAL,
753 CAUGHT_BY_DESUGARING 754 CAUGHT_BY_DESUGARING,
755 CAUGHT_BY_ASYNC_AWAIT
754 }; 756 };
755 CatchType PredictExceptionCatcher(); 757 CatchType PredictExceptionCatcher();
756 758
757 void ScheduleThrow(Object* exception); 759 void ScheduleThrow(Object* exception);
758 // Re-set pending message, script and positions reported to the TryCatch 760 // Re-set pending message, script and positions reported to the TryCatch
759 // back to the TLS for re-use when rethrowing. 761 // back to the TLS for re-use when rethrowing.
760 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler); 762 void RestorePendingMessageFromTryCatch(v8::TryCatch* handler);
761 // Un-schedule an exception that was caught by a TryCatch handler. 763 // Un-schedule an exception that was caught by a TryCatch handler.
762 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler); 764 void CancelScheduledExceptionFromTryCatch(v8::TryCatch* handler);
763 void ReportPendingMessages(); 765 void ReportPendingMessages();
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 1676
1675 EmbeddedVector<char, 128> filename_; 1677 EmbeddedVector<char, 128> filename_;
1676 FILE* file_; 1678 FILE* file_;
1677 int scope_depth_; 1679 int scope_depth_;
1678 }; 1680 };
1679 1681
1680 } // namespace internal 1682 } // namespace internal
1681 } // namespace v8 1683 } // namespace v8
1682 1684
1683 #endif // V8_ISOLATE_H_ 1685 #endif // V8_ISOLATE_H_
OLDNEW
« no previous file with comments | « src/heap-symbols.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698