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

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: rebased 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
« no previous file with comments | « src/js/proxy.js ('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 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 9504 matching lines...) Expand 10 before | Expand all | Expand 10 after
9515 9515
9516 // ES6 9.5.5 9516 // ES6 9.5.5
9517 static bool GetOwnPropertyDescriptor(LookupIterator* it, 9517 static bool GetOwnPropertyDescriptor(LookupIterator* it,
9518 PropertyDescriptor* desc); 9518 PropertyDescriptor* desc);
9519 9519
9520 // ES6 9.5.6 9520 // ES6 9.5.6
9521 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, 9521 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object,
9522 Handle<Object> key, PropertyDescriptor* desc, 9522 Handle<Object> key, PropertyDescriptor* desc,
9523 ShouldThrow should_throw); 9523 ShouldThrow should_throw);
9524 9524
9525 // ES6 9.5.7
9526 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate,
9527 Handle<JSProxy> proxy,
9528 Handle<Name> name);
9529
9525 // ES6 9.5.10 (when passed SLOPPY) 9530 // ES6 9.5.10 (when passed SLOPPY)
9526 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement( 9531 MUST_USE_RESULT static Maybe<bool> DeletePropertyOrElement(
9527 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode); 9532 Handle<JSProxy> proxy, Handle<Name> name, LanguageMode language_mode);
9528 9533
9529 // ES6 9.5.11 9534 // ES6 9.5.11
9530 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver, 9535 static bool Enumerate(Isolate* isolate, Handle<JSReceiver> receiver,
9531 Handle<JSProxy> proxy, KeyAccumulator* accumulator); 9536 Handle<JSProxy> proxy, KeyAccumulator* accumulator);
9532 9537
9533 // ES6 9.5.12 9538 // ES6 9.5.12
9534 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver, 9539 static bool OwnPropertyKeys(Isolate* isolate, Handle<JSReceiver> receiver,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
9581 9586
9582 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy, 9587 MUST_USE_RESULT static MaybeHandle<Object> GetTrap(Handle<JSProxy> proxy,
9583 Handle<String> trap); 9588 Handle<String> trap);
9584 9589
9585 // Invoke a trap by name. If the trap does not exist on this's handler, 9590 // Invoke a trap by name. If the trap does not exist on this's handler,
9586 // but derived_trap is non-NULL, invoke that instead. May cause GC. 9591 // but derived_trap is non-NULL, invoke that instead. May cause GC.
9587 MUST_USE_RESULT static MaybeHandle<Object> CallTrap( 9592 MUST_USE_RESULT static MaybeHandle<Object> CallTrap(
9588 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap, 9593 Handle<JSProxy> proxy, const char* name, Handle<Object> derived_trap,
9589 int argc, Handle<Object> args[]); 9594 int argc, Handle<Object> args[]);
9590 9595
9591 MUST_USE_RESULT static Maybe<bool> HasPropertyWithHandler(
9592 Handle<JSProxy> proxy, Handle<Name> name);
9593
9594 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy); 9596 DISALLOW_IMPLICIT_CONSTRUCTORS(JSProxy);
9595 }; 9597 };
9596 9598
9597 9599
9598 class JSFunctionProxy: public JSProxy { 9600 class JSFunctionProxy: public JSProxy {
9599 public: 9601 public:
9600 // [call_trap]: The call trap. 9602 // [call_trap]: The call trap.
9601 DECL_ACCESSORS(call_trap, JSReceiver) 9603 DECL_ACCESSORS(call_trap, JSReceiver)
9602 9604
9603 // [construct_trap]: The construct trap. 9605 // [construct_trap]: The construct trap.
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after
10716 } 10718 }
10717 return value; 10719 return value;
10718 } 10720 }
10719 }; 10721 };
10720 10722
10721 10723
10722 } // NOLINT, false-positive due to second-order macros. 10724 } // NOLINT, false-positive due to second-order macros.
10723 } // NOLINT, false-positive due to second-order macros. 10725 } // NOLINT, false-positive due to second-order macros.
10724 10726
10725 #endif // V8_OBJECTS_H_ 10727 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/proxy.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698