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

Side by Side Diff: src/js/proxy.js

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/contexts.h ('k') | src/objects.h » ('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 (function(global, utils) { 5 (function(global, utils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 } 124 }
125 this.defineProperty(name, { 125 this.defineProperty(name, {
126 value: val, 126 value: val,
127 writable: true, 127 writable: true,
128 enumerable: true, 128 enumerable: true,
129 configurable: true}); 129 configurable: true});
130 return true; 130 return true;
131 } 131 }
132 132
133 function DerivedHasTrap(name) {
134 return !!this.getPropertyDescriptor(name)
135 }
136
137 function DerivedHasOwnTrap(name) { 133 function DerivedHasOwnTrap(name) {
138 return !!this.getOwnPropertyDescriptor(name) 134 return !!this.getOwnPropertyDescriptor(name)
139 } 135 }
140 136
141 function DerivedKeysTrap() { 137 function DerivedKeysTrap() {
142 var names = this.getOwnPropertyNames() 138 var names = this.getOwnPropertyNames()
143 var enumerableNames = [] 139 var enumerableNames = []
144 for (var i = 0, count = 0; i < names.length; ++i) { 140 for (var i = 0, count = 0; i < names.length; ++i) {
145 var name = names[i] 141 var name = names[i]
146 if (IS_SYMBOL(name)) continue 142 if (IS_SYMBOL(name)) continue
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Exports 186 // Exports
191 187
192 utils.Export(function(to) { 188 utils.Export(function(to) {
193 to.ProxyDelegateCallAndConstruct = DelegateCallAndConstruct; 189 to.ProxyDelegateCallAndConstruct = DelegateCallAndConstruct;
194 to.ProxyDerivedHasOwnTrap = DerivedHasOwnTrap; 190 to.ProxyDerivedHasOwnTrap = DerivedHasOwnTrap;
195 to.ProxyDerivedKeysTrap = DerivedKeysTrap; 191 to.ProxyDerivedKeysTrap = DerivedKeysTrap;
196 }); 192 });
197 193
198 %InstallToContext([ 194 %InstallToContext([
199 "derived_get_trap", DerivedGetTrap, 195 "derived_get_trap", DerivedGetTrap,
200 "derived_has_trap", DerivedHasTrap,
201 "derived_set_trap", DerivedSetTrap, 196 "derived_set_trap", DerivedSetTrap,
202 "proxy_enumerate", ProxyEnumerate, 197 "proxy_enumerate", ProxyEnumerate,
203 ]); 198 ]);
204 199
205 }) 200 })
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698