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

Side by Side Diff: src/objects.h

Issue 1479143002: [proxies] [[HasProperty]]: fix trap call. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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_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 9502 matching lines...) Expand 10 before | Expand all | Expand 10 after
9513 9513
9514 // ES6 9.5.5 9514 // ES6 9.5.5
9515 static bool GetOwnPropertyDescriptor(LookupIterator* it, 9515 static bool GetOwnPropertyDescriptor(LookupIterator* it,
9516 PropertyDescriptor* desc); 9516 PropertyDescriptor* desc);
9517 9517
9518 // ES6 9.5.6 9518 // ES6 9.5.6
9519 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, 9519 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object,
9520 Handle<Object> key, PropertyDescriptor* desc, 9520 Handle<Object> key, PropertyDescriptor* desc,
9521 ShouldThrow should_throw); 9521 ShouldThrow should_throw);
9522 9522
9523 // ES6 9.5.7
9524 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate,
9525 Handle<JSProxy> proxy,
9526 Handle<Name> name);
9527
9523 // ES6 9.5.10 (when passed SLOPPY) 9528 // ES6 9.5.10 (when passed SLOPPY)
9524 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement( 9529 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement(
9525 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); 9530 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode);
9526 9531
9527 // ES6 9.5.11 9532 // ES6 9.5.11
9528 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver, 9533 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver,
9529 Handle<JSProxy> proxy, KeyAccumulator* accumulator); 9534 Handle<JSProxy> proxy, KeyAccumulator* accumulator);
9530 9535
9531 // ES6 9.5.12 9536 // ES6 9.5.12
9532 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, 9537 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
9579 9584
9580 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy, 9585 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy,
9581 Handle<String> trap); 9586 Handle<String> trap);
9582 9587
9583 // Invoke a trap by name. If the trap does not exist on this's handler, 9588 // Invoke a trap by name. If the trap does not exist on this's handler,
9584 // but derived_trap is non-NULL, invoke that instead. May cause GC. 9589 // but derived_trap is non-NULL, invoke that instead. May cause GC.
9585 MUST_USE_RESULT static MaybeHandle<Object> CallTrap( 9590 MUST_USE_RESULT static MaybeHandle<Object> CallTrap(
9586 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap, 9591 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap,
9587 int argc, Handle<Object> args[]); 9592 int argc, Handle<Object> args[]);
9588 9593
9589 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler(
9590 Handle<JSProxy> proxy, Handle<Name> name);
9591
9592 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); 9594 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy);
9593 }; 9595 };
9594 9596
9595 9597
9596 class JSFunctionProxy: public JSProxy { 9598 class JSFunctionProxy: public JSProxy {
9597 public: 9599 public:
9598 // [call_trap]: The call trap. 9600 // [call_trap]: The call trap.
9599 DECL_ACCESSORS(call_trap, JSReceiver) 9601 DECL_ACCESSORS(call_trap, JSReceiver)
9600 9602
9601 // [construct_trap]: The construct trap. 9603 // [construct_trap]: The construct trap.
(...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after
10729 } 10731 }
10730 return value; 10732 return value;
10731 } 10733 }
10732 }; 10734 };
10733 10735
10734 10736
10735 } // NOLINT, false-positive due to second-order macros. 10737 } // NOLINT, false-positive due to second-order macros.
10736 } // NOLINT, false-positive due to second-order macros. 10738 } // NOLINT, false-positive due to second-order macros.
10737 10739
10738 #endif // V8_OBJECTS_H_ 10740 #endif // V8_OBJECTS_H_
OLDNEW
« src/js/proxy.js ('K') | « src/js/proxy.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698