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_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 | 9 |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 9506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9517 | 9517 |
9518 DECLARE_CAST(JSProxy) | 9518 DECLARE_CAST(JSProxy) |
9519 | 9519 |
9520 // ES6 9.5.1 | 9520 // ES6 9.5.1 |
9521 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver); | 9521 static MaybeHandle<Object> GetPrototype(Handle<JSProxy> receiver); |
9522 | 9522 |
9523 // ES6 9.5.5 | 9523 // ES6 9.5.5 |
9524 static bool GetOwnPropertyDescriptor(LookupIterator* it, | 9524 static bool GetOwnPropertyDescriptor(LookupIterator* it, |
9525 PropertyDescriptor* desc); | 9525 PropertyDescriptor* desc); |
9526 | 9526 |
9527 // ES6 9.5.6 | |
9528 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, | |
9529 Handle<Object> key, PropertyDescriptor* desc, | |
9530 ShouldThrow should_throw); | |
9531 | |
9527 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( | 9532 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler( |
9528 Handle<JSProxy> proxy, | 9533 Handle<JSProxy> proxy, |
9529 Handle<Object> receiver, | 9534 Handle<Object> receiver, |
9530 Handle<Name> name); | 9535 Handle<Name> name); |
9531 | 9536 |
9532 // If the handler defines an accessor property with a setter, invoke it. | 9537 // If the handler defines an accessor property with a setter, invoke it. |
9533 // If it defines an accessor property without a setter, or a data property | 9538 // If it defines an accessor property without a setter, or a data property |
9534 // that is read-only, fail. In all these cases set '*done' to true. | 9539 // that is read-only, fail. In all these cases set '*done' to true. |
9535 // Otherwise set it to false, in which case the return value is not | 9540 // Otherwise set it to false, in which case the return value is not |
9536 // meaningful. | 9541 // meaningful. |
9537 MUST_USE_RESULT | 9542 MUST_USE_RESULT |
9538 static Maybe<bool> SetPropertyViaPrototypesWithHandler( | 9543 static Maybe<bool> SetPropertyViaPrototypesWithHandler( |
9539 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, | 9544 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, |
9540 Handle<Object> value, ShouldThrow should_throw, bool* done); | 9545 Handle<Object> value, ShouldThrow should_throw, bool* done); |
9541 | 9546 |
9542 MUST_USE_RESULT static Maybe<PropertyAttributes> | 9547 MUST_USE_RESULT static Maybe<PropertyAttributes> |
9543 GetPropertyAttributesWithHandler(Handle<JSProxy> proxy, | 9548 GetPropertyAttributesWithHandler(LookupIterator* it); |
9544 Handle<Object> receiver, | 9549 |
neis
2015/11/17 21:37:40
Can we get rid of the "WithHandler" suffix?
Jakob Kummerow
2015/11/18 14:35:50
Done.
| |
9545 Handle<Name> name); | |
9546 MUST_USE_RESULT static Maybe<bool> SetPropertyWithHandler( | 9550 MUST_USE_RESULT static Maybe<bool> SetPropertyWithHandler( |
9547 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, | 9551 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, |
9548 Handle<Object> value, ShouldThrow should_throw); | 9552 Handle<Object> value, ShouldThrow should_throw); |
9549 | 9553 |
9550 // Dispatched behavior. | 9554 // Dispatched behavior. |
9551 DECLARE_PRINTER(JSProxy) | 9555 DECLARE_PRINTER(JSProxy) |
9552 DECLARE_VERIFIER(JSProxy) | 9556 DECLARE_VERIFIER(JSProxy) |
9553 | 9557 |
9554 // Layout description. We add padding so that a proxy has the same | 9558 // Layout description. We add padding so that a proxy has the same |
9555 // size as a virgin JSObject. This is essential for becoming a JSObject | 9559 // size as a virgin JSObject. This is essential for becoming a JSObject |
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
10706 } | 10710 } |
10707 return value; | 10711 return value; |
10708 } | 10712 } |
10709 }; | 10713 }; |
10710 | 10714 |
10711 | 10715 |
10712 } // NOLINT, false-positive due to second-order macros. | 10716 } // NOLINT, false-positive due to second-order macros. |
10713 } // NOLINT, false-positive due to second-order macros. | 10717 } // NOLINT, false-positive due to second-order macros. |
10714 | 10718 |
10715 #endif // V8_OBJECTS_H_ | 10719 #endif // V8_OBJECTS_H_ |
OLD | NEW |