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

Side by Side Diff: src/proxy.js

Issue 352173006: Clean up the global object naming madness. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 5 months 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 | Annotate | Revision Log
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 "use strict"; 5 "use strict";
6 6
7 // This file relies on the fact that the following declaration has been made 7 // This file relies on the fact that the following declaration has been made
8 // in runtime.js: 8 // in runtime.js:
9 // var $Object = global.Object; 9 // var $Object = global.Object;
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 return %CreateJSFunctionProxy( 42 return %CreateJSFunctionProxy(
43 handler, callTrap, constructTrap, $Function.prototype) 43 handler, callTrap, constructTrap, $Function.prototype)
44 } 44 }
45 45
46 46
47 // ------------------------------------------------------------------- 47 // -------------------------------------------------------------------
48 48
49 function SetUpProxy() { 49 function SetUpProxy() {
50 %CheckIsBootstrapping() 50 %CheckIsBootstrapping()
51 51
52 var global_receiver = %GlobalReceiver(global); 52 var global_proxy = %GlobalProxy(global);
53 global_receiver.Proxy = $Proxy; 53 global_proxy.Proxy = $Proxy;
54 54
55 // Set up non-enumerable properties of the Proxy object. 55 // Set up non-enumerable properties of the Proxy object.
56 InstallFunctions($Proxy, DONT_ENUM, [ 56 InstallFunctions($Proxy, DONT_ENUM, [
57 "create", ProxyCreate, 57 "create", ProxyCreate,
58 "createFunction", ProxyCreateFunction 58 "createFunction", ProxyCreateFunction
59 ]) 59 ])
60 } 60 }
61 61
62 SetUpProxy(); 62 SetUpProxy();
63 63
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 } 182 }
183 183
184 function ProxyEnumerate(proxy) { 184 function ProxyEnumerate(proxy) {
185 var handler = %GetHandler(proxy) 185 var handler = %GetHandler(proxy)
186 if (IS_UNDEFINED(handler.enumerate)) { 186 if (IS_UNDEFINED(handler.enumerate)) {
187 return %Apply(DerivedEnumerateTrap, handler, [], 0, 0) 187 return %Apply(DerivedEnumerateTrap, handler, [], 0, 0)
188 } else { 188 } else {
189 return ToNameArray(handler.enumerate(), "enumerate", false) 189 return ToNameArray(handler.enumerate(), "enumerate", false)
190 } 190 }
191 } 191 }
OLDNEW
« no previous file with comments | « src/objects-inl.h ('k') | src/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698