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

Side by Side Diff: src/objects.h

Issue 2311873002: [api] Add interceptor for getOwnPropertyDescriptor(). (Closed)
Patch Set: Crash instead of exception on invalid descriptor. 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/counters.h ('k') | src/objects.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 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 2048 matching lines...) Expand 10 before | Expand all | Expand 10 after
2059 Handle<AllocationSite> site = Handle<AllocationSite>::null()); 2059 Handle<AllocationSite> site = Handle<AllocationSite>::null());
2060 2060
2061 // Gets global object properties. 2061 // Gets global object properties.
2062 inline GlobalDictionary* global_dictionary(); 2062 inline GlobalDictionary* global_dictionary();
2063 2063
2064 static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object); 2064 static MaybeHandle<Context> GetFunctionRealm(Handle<JSObject> object);
2065 2065
2066 // [elements]: The elements (properties with names that are integers). 2066 // [elements]: The elements (properties with names that are integers).
2067 // 2067 //
2068 // Elements can be in two general modes: fast and slow. Each mode 2068 // Elements can be in two general modes: fast and slow. Each mode
2069 // corrensponds to a set of object representations of elements that 2069 // corresponds to a set of object representations of elements that
2070 // have something in common. 2070 // have something in common.
2071 // 2071 //
2072 // In the fast mode elements is a FixedArray and so each element can 2072 // In the fast mode elements is a FixedArray and so each element can
2073 // be quickly accessed. This fact is used in the generated code. The 2073 // be quickly accessed. This fact is used in the generated code. The
2074 // elements array can have one of three maps in this mode: 2074 // elements array can have one of three maps in this mode:
2075 // fixed_array_map, sloppy_arguments_elements_map or 2075 // fixed_array_map, sloppy_arguments_elements_map or
2076 // fixed_cow_array_map (for copy-on-write arrays). In the latter case 2076 // fixed_cow_array_map (for copy-on-write arrays). In the latter case
2077 // the elements array may be shared by a few objects and so before 2077 // the elements array may be shared by a few objects and so before
2078 // writing to any element the array must be copied. Use 2078 // writing to any element the array must be copied. Use
2079 // EnsureWritableFastElements in this case. 2079 // EnsureWritableFastElements in this case.
(...skipping 8704 matching lines...) Expand 10 before | Expand all | Expand 10 after
10784 private: 10784 private:
10785 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo); 10785 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessCheckInfo);
10786 }; 10786 };
10787 10787
10788 10788
10789 class InterceptorInfo: public Struct { 10789 class InterceptorInfo: public Struct {
10790 public: 10790 public:
10791 DECL_ACCESSORS(getter, Object) 10791 DECL_ACCESSORS(getter, Object)
10792 DECL_ACCESSORS(setter, Object) 10792 DECL_ACCESSORS(setter, Object)
10793 DECL_ACCESSORS(query, Object) 10793 DECL_ACCESSORS(query, Object)
10794 DECL_ACCESSORS(descriptor, Object)
10794 DECL_ACCESSORS(deleter, Object) 10795 DECL_ACCESSORS(deleter, Object)
10795 DECL_ACCESSORS(enumerator, Object) 10796 DECL_ACCESSORS(enumerator, Object)
10796 DECL_ACCESSORS(definer, Object) 10797 DECL_ACCESSORS(definer, Object)
10797 DECL_ACCESSORS(data, Object) 10798 DECL_ACCESSORS(data, Object)
10798 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols) 10799 DECL_BOOLEAN_ACCESSORS(can_intercept_symbols)
10799 DECL_BOOLEAN_ACCESSORS(all_can_read) 10800 DECL_BOOLEAN_ACCESSORS(all_can_read)
10800 DECL_BOOLEAN_ACCESSORS(non_masking) 10801 DECL_BOOLEAN_ACCESSORS(non_masking)
10801 10802
10802 inline int flags() const; 10803 inline int flags() const;
10803 inline void set_flags(int flags); 10804 inline void set_flags(int flags);
10804 10805
10805 DECLARE_CAST(InterceptorInfo) 10806 DECLARE_CAST(InterceptorInfo)
10806 10807
10807 // Dispatched behavior. 10808 // Dispatched behavior.
10808 DECLARE_PRINTER(InterceptorInfo) 10809 DECLARE_PRINTER(InterceptorInfo)
10809 DECLARE_VERIFIER(InterceptorInfo) 10810 DECLARE_VERIFIER(InterceptorInfo)
10810 10811
10811 static const int kGetterOffset = HeapObject::kHeaderSize; 10812 static const int kGetterOffset = HeapObject::kHeaderSize;
10812 static const int kSetterOffset = kGetterOffset + kPointerSize; 10813 static const int kSetterOffset = kGetterOffset + kPointerSize;
10813 static const int kQueryOffset = kSetterOffset + kPointerSize; 10814 static const int kQueryOffset = kSetterOffset + kPointerSize;
10814 static const int kDeleterOffset = kQueryOffset + kPointerSize; 10815 static const int kDescriptorOffset = kQueryOffset + kPointerSize;
10816 static const int kDeleterOffset = kDescriptorOffset + kPointerSize;
10815 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize; 10817 static const int kEnumeratorOffset = kDeleterOffset + kPointerSize;
10816 static const int kDefinerOffset = kEnumeratorOffset + kPointerSize; 10818 static const int kDefinerOffset = kEnumeratorOffset + kPointerSize;
10817 static const int kDataOffset = kDefinerOffset + kPointerSize; 10819 static const int kDataOffset = kDefinerOffset + kPointerSize;
10818 static const int kFlagsOffset = kDataOffset + kPointerSize; 10820 static const int kFlagsOffset = kDataOffset + kPointerSize;
10819 static const int kSize = kFlagsOffset + kPointerSize; 10821 static const int kSize = kFlagsOffset + kPointerSize;
10820 10822
10821 static const int kCanInterceptSymbolsBit = 0; 10823 static const int kCanInterceptSymbolsBit = 0;
10822 static const int kAllCanReadBit = 1; 10824 static const int kAllCanReadBit = 1;
10823 static const int kNonMasking = 2; 10825 static const int kNonMasking = 2;
10824 10826
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
11205 } 11207 }
11206 return value; 11208 return value;
11207 } 11209 }
11208 }; 11210 };
11209 11211
11210 11212
11211 } // NOLINT, false-positive due to second-order macros. 11213 } // NOLINT, false-positive due to second-order macros.
11212 } // NOLINT, false-positive due to second-order macros. 11214 } // NOLINT, false-positive due to second-order macros.
11213 11215
11214 #endif // V8_OBJECTS_H_ 11216 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/counters.h ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698