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

Side by Side Diff: src/isolate.h

Issue 2161263003: [debug] use catch prediction flag for promise rejections. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 5 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
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 #include <set> 10 #include <set>
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 static int ArchiveSpacePerThread() { return sizeof(ThreadLocalTop); } 653 static int ArchiveSpacePerThread() { return sizeof(ThreadLocalTop); }
654 void FreeThreadResources() { thread_local_top_.Free(); } 654 void FreeThreadResources() { thread_local_top_.Free(); }
655 655
656 // This method is called by the api after operations that may throw 656 // This method is called by the api after operations that may throw
657 // exceptions. If an exception was thrown and not handled by an external 657 // exceptions. If an exception was thrown and not handled by an external
658 // handler the exception is scheduled to be rethrown when we return to running 658 // handler the exception is scheduled to be rethrown when we return to running
659 // JavaScript code. If an exception is scheduled true is returned. 659 // JavaScript code. If an exception is scheduled true is returned.
660 bool OptionalRescheduleException(bool is_bottom_call); 660 bool OptionalRescheduleException(bool is_bottom_call);
661 661
662 // Push and pop a promise and the current try-catch handler. 662 // Push and pop a promise and the current try-catch handler.
663 void PushPromise(Handle<JSObject> promise, Handle<JSFunction> function); 663 void PushPromise(Handle<JSObject> promise);
664 void PopPromise(); 664 void PopPromise();
665 Handle<Object> GetPromiseOnStackOnThrow(); 665 Handle<Object> GetPromiseOnStackOnThrow();
666 666
667 class ExceptionScope { 667 class ExceptionScope {
668 public: 668 public:
669 // Scope currently can only be used for regular exceptions, 669 // Scope currently can only be used for regular exceptions,
670 // not termination exception. 670 // not termination exception.
671 inline explicit ExceptionScope(Isolate* isolate); 671 inline explicit ExceptionScope(Isolate* isolate);
672 inline ~ExceptionScope(); 672 inline ~ExceptionScope();
673 673
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
1429 DISALLOW_COPY_AND_ASSIGN(Isolate); 1429 DISALLOW_COPY_AND_ASSIGN(Isolate);
1430 }; 1430 };
1431 1431
1432 1432
1433 #undef FIELD_ACCESSOR 1433 #undef FIELD_ACCESSOR
1434 #undef THREAD_LOCAL_TOP_ACCESSOR 1434 #undef THREAD_LOCAL_TOP_ACCESSOR
1435 1435
1436 1436
1437 class PromiseOnStack { 1437 class PromiseOnStack {
1438 public: 1438 public:
1439 PromiseOnStack(Handle<JSFunction> function, Handle<JSObject> promise, 1439 PromiseOnStack(Handle<JSObject> promise, PromiseOnStack* prev)
1440 PromiseOnStack* prev) 1440 : promise_(promise), prev_(prev) {}
1441 : function_(function), promise_(promise), prev_(prev) {}
1442 Handle<JSFunction> function() { return function_; }
1443 Handle<JSObject> promise() { return promise_; } 1441 Handle<JSObject> promise() { return promise_; }
1444 PromiseOnStack* prev() { return prev_; } 1442 PromiseOnStack* prev() { return prev_; }
1445 1443
1446 private: 1444 private:
1447 Handle<JSFunction> function_;
1448 Handle<JSObject> promise_; 1445 Handle<JSObject> promise_;
1449 PromiseOnStack* prev_; 1446 PromiseOnStack* prev_;
1450 }; 1447 };
1451 1448
1452 1449
1453 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the 1450 // If the GCC version is 4.1.x or 4.2.x an additional field is added to the
1454 // class as a work around for a bug in the generated code found with these 1451 // class as a work around for a bug in the generated code found with these
1455 // versions of GCC. See V8 issue 122 for details. 1452 // versions of GCC. See V8 issue 122 for details.
1456 class SaveContext BASE_EMBEDDED { 1453 class SaveContext BASE_EMBEDDED {
1457 public: 1454 public:
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1642 1639
1643 EmbeddedVector<char, 128> filename_; 1640 EmbeddedVector<char, 128> filename_;
1644 FILE* file_; 1641 FILE* file_;
1645 int scope_depth_; 1642 int scope_depth_;
1646 }; 1643 };
1647 1644
1648 } // namespace internal 1645 } // namespace internal
1649 } // namespace v8 1646 } // namespace v8
1650 1647
1651 #endif // V8_ISOLATE_H_ 1648 #endif // V8_ISOLATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698