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/objects.h

Issue 2604483002: [promises] Move PromiseHasUserDefinedRejectHandler to c++ (Closed)
Patch Set: use getdataproperty Created 3 years, 12 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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 8637 matching lines...) Expand 10 before | Expand all | Expand 10 after
8648 // attached to a FixedArray. 8648 // attached to a FixedArray.
8649 DECL_ACCESSORS(deferred, Object) 8649 DECL_ACCESSORS(deferred, Object)
8650 DECL_ACCESSORS(fulfill_reactions, Object) 8650 DECL_ACCESSORS(fulfill_reactions, Object)
8651 DECL_ACCESSORS(reject_reactions, Object) 8651 DECL_ACCESSORS(reject_reactions, Object)
8652 8652
8653 DECL_INT_ACCESSORS(flags) 8653 DECL_INT_ACCESSORS(flags)
8654 8654
8655 // [has_handler]: Whether this promise has a reject handler or not. 8655 // [has_handler]: Whether this promise has a reject handler or not.
8656 DECL_BOOLEAN_ACCESSORS(has_handler) 8656 DECL_BOOLEAN_ACCESSORS(has_handler)
8657 8657
8658 // [handled_hint]: Whether this promise will be handled by a catch
8659 // block in an async function.
8660 DECL_BOOLEAN_ACCESSORS(handled_hint)
8661
8658 static const char* Status(int status); 8662 static const char* Status(int status);
8659 8663
8660 DECLARE_CAST(JSPromise) 8664 DECLARE_CAST(JSPromise)
8661 8665
8662 // Dispatched behavior. 8666 // Dispatched behavior.
8663 DECLARE_PRINTER(JSPromise) 8667 DECLARE_PRINTER(JSPromise)
8664 DECLARE_VERIFIER(JSPromise) 8668 DECLARE_VERIFIER(JSPromise)
8665 8669
8666 // Layout description. 8670 // Layout description.
8667 static const int kStatusOffset = JSObject::kHeaderSize; 8671 static const int kStatusOffset = JSObject::kHeaderSize;
8668 static const int kResultOffset = kStatusOffset + kPointerSize; 8672 static const int kResultOffset = kStatusOffset + kPointerSize;
8669 static const int kDeferredOffset = kResultOffset + kPointerSize; 8673 static const int kDeferredOffset = kResultOffset + kPointerSize;
8670 static const int kFulfillReactionsOffset = kDeferredOffset + kPointerSize; 8674 static const int kFulfillReactionsOffset = kDeferredOffset + kPointerSize;
8671 static const int kRejectReactionsOffset = 8675 static const int kRejectReactionsOffset =
8672 kFulfillReactionsOffset + kPointerSize; 8676 kFulfillReactionsOffset + kPointerSize;
8673 static const int kFlagsOffset = kRejectReactionsOffset + kPointerSize; 8677 static const int kFlagsOffset = kRejectReactionsOffset + kPointerSize;
8674 static const int kSize = kFlagsOffset + kPointerSize; 8678 static const int kSize = kFlagsOffset + kPointerSize;
8675 8679
8676 // Flags layout. 8680 // Flags layout.
8677 static const int kHasHandlerBit = 0; 8681 static const int kHasHandlerBit = 0;
8682 static const int kHandledHintBit = 1;
8678 }; 8683 };
8679 8684
8680 // Regular expressions 8685 // Regular expressions
8681 // The regular expression holds a single reference to a FixedArray in 8686 // The regular expression holds a single reference to a FixedArray in
8682 // the kDataOffset field. 8687 // the kDataOffset field.
8683 // The FixedArray contains the following data: 8688 // The FixedArray contains the following data:
8684 // - tag : type of regexp implementation (not compiled yet, atom or irregexp) 8689 // - tag : type of regexp implementation (not compiled yet, atom or irregexp)
8685 // - reference to the original source string 8690 // - reference to the original source string
8686 // - reference to the original flag string 8691 // - reference to the original flag string
8687 // If it is an atom regexp 8692 // If it is an atom regexp
(...skipping 3020 matching lines...) Expand 10 before | Expand all | Expand 10 after
11708 } 11713 }
11709 }; 11714 };
11710 11715
11711 11716
11712 } // NOLINT, false-positive due to second-order macros. 11717 } // NOLINT, false-positive due to second-order macros.
11713 } // NOLINT, false-positive due to second-order macros. 11718 } // NOLINT, false-positive due to second-order macros.
11714 11719
11715 #include "src/objects/object-macros-undef.h" 11720 #include "src/objects/object-macros-undef.h"
11716 11721
11717 #endif // V8_OBJECTS_H_ 11722 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/promise.js ('k') | src/objects-inl.h » ('j') | src/runtime/runtime-promise.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698