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

Side by Side Diff: src/objects.h

Issue 1482283002: [runtime] [proxy] implementing [[Get]] trap. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: more specific assertThrows 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 // ES6 9.5.6 9513 // ES6 9.5.6
9514 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object, 9514 static bool DefineOwnProperty(Isolate* isolate, Handle<JSProxy> object,
9515 Handle<Object> key, PropertyDescriptor* desc, 9515 Handle<Object> key, PropertyDescriptor* desc,
9516 ShouldThrow should_throw); 9516 ShouldThrow should_throw);
9517 9517
9518 // ES6 9.5.7 9518 // ES6 9.5.7
9519 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate, 9519 MUST_USE_RESULT static Maybe<bool> HasProperty(Isolate* isolate,
9520 Handle<JSProxy> proxy, 9520 Handle<JSProxy> proxy,
9521 Handle<Name> name); 9521 Handle<Name> name);
9522 9522
9523 // ES6 9.5.8
9524 MUST_USE_RESULT static MaybeHandle<Object> GetProperty(
9525 Isolate* isolate, Handle<JSProxy> proxy, Handle<Name> name,
9526 Handle<Object> receiver, LanguageMode language_mode);
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,
9533 Handle<JSProxy> proxy, KeyFilter filter, 9538 Handle<JSProxy> proxy, KeyFilter filter,
9534 Enumerability enum_policy, 9539 Enumerability enum_policy,
9535 KeyAccumulator* accumulator); 9540 KeyAccumulator* accumulator);
9536 9541
9537 MUST_USE_RESULT static MaybeHandle<Object> GetPropertyWithHandler(
9538 Handle<JSProxy> proxy,
9539 Handle<Object> receiver,
9540 Handle<Name> name);
9541
9542 // If the handler defines an accessor property with a setter, invoke it. 9542 // If the handler defines an accessor property with a setter, invoke it.
9543 // If it defines an accessor property without a setter, or a data property 9543 // If it defines an accessor property without a setter, or a data property
9544 // that is read-only, fail. In all these cases set '*done' to true. 9544 // that is read-only, fail. In all these cases set '*done' to true.
9545 // Otherwise set it to false, in which case the return value is not 9545 // Otherwise set it to false, in which case the return value is not
9546 // meaningful. 9546 // meaningful.
9547 MUST_USE_RESULT 9547 MUST_USE_RESULT
9548 static Maybe<bool> SetPropertyViaPrototypesWithHandler( 9548 static Maybe<bool> SetPropertyViaPrototypesWithHandler(
9549 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name, 9549 Handle<JSProxy> proxy, Handle<Object> receiver, Handle<Name> name,
9550 Handle<Object> value, ShouldThrow should_throw, bool* done); 9550 Handle<Object> value, ShouldThrow should_throw, bool* done);
9551 9551
(...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after
10711 } 10711 }
10712 return value; 10712 return value;
10713 } 10713 }
10714 }; 10714 };
10715 10715
10716 10716
10717 } // NOLINT, false-positive due to second-order macros. 10717 } // NOLINT, false-positive due to second-order macros.
10718 } // NOLINT, false-positive due to second-order macros. 10718 } // NOLINT, false-positive due to second-order macros.
10719 10719
10720 #endif // V8_OBJECTS_H_ 10720 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/js/proxy.js ('k') | src/objects.cc » ('j') | test/mjsunit/harmony/proxies-get.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698