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

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

Issue 1543803002: Revert of [proxies] Better print for proxies in d8 (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
« no previous file with comments | « src/js/object-observe.js ('k') | src/js/v8natives.js » ('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
11 // ---------------------------------------------------------------------------- 11 // ----------------------------------------------------------------------------
12 // Imports 12 // Imports
13 // 13 //
14 var GlobalProxy = global.Proxy; 14 var GlobalProxy = global.Proxy;
15 var MakeTypeError; 15 var MakeTypeError;
16 16
17 utils.Import(function(from) { 17 utils.Import(function(from) {
18 MakeTypeError = from.MakeTypeError; 18 MakeTypeError = from.MakeTypeError;
19 }); 19 });
20 20
21 //---------------------------------------------------------------------------- 21 //----------------------------------------------------------------------------
22 22
23 function ProxyCreateRevocable(target, handler) { 23 function ProxyCreateRevocable(target, handler) {
24 var p = new GlobalProxy(target, handler); 24 var p = new GlobalProxy(target, handler);
25 return {proxy: p, revoke: () => %JSProxyRevoke(p)}; 25 return {proxy: p, revoke: () => %RevokeProxy(p)};
26 } 26 }
27 27
28 // ------------------------------------------------------------------- 28 // -------------------------------------------------------------------
29 // Proxy Builtins 29 // Proxy Builtins
30 30
31 // Implements part of ES6 9.5.11 Proxy.[[Enumerate]]: 31 // Implements part of ES6 9.5.11 Proxy.[[Enumerate]]:
32 // Call the trap, which should return an iterator, exhaust the iterator, 32 // Call the trap, which should return an iterator, exhaust the iterator,
33 // and return an array containing the values. 33 // and return an array containing the values.
34 function ProxyEnumerate(trap, handler, target) { 34 function ProxyEnumerate(trap, handler, target) {
35 // 7. Let trapResult be ? Call(trap, handler, «target»). 35 // 7. Let trapResult be ? Call(trap, handler, «target»).
(...skipping 24 matching lines...) Expand all
60 ]); 60 ]);
61 61
62 // ------------------------------------------------------------------- 62 // -------------------------------------------------------------------
63 // Exports 63 // Exports
64 64
65 %InstallToContext([ 65 %InstallToContext([
66 "proxy_enumerate", ProxyEnumerate, 66 "proxy_enumerate", ProxyEnumerate,
67 ]); 67 ]);
68 68
69 }) 69 })
OLDNEW
« no previous file with comments | « src/js/object-observe.js ('k') | src/js/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698