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

Unified Diff: src/proxy.js

Issue 1154483002: Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: do not leak utils object Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/promise.js ('k') | src/regexp.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/proxy.js
diff --git a/src/proxy.js b/src/proxy.js
index 93ad8ddb0dd2ca51df2b95eb69a67431b4928f1e..782035b6f0b407edc0ac66b5e5491fc4bce86c8f 100644
--- a/src/proxy.js
+++ b/src/proxy.js
@@ -2,11 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var $proxyDelegateCallAndConstruct;
var $proxyDerivedGetTrap;
var $proxyDerivedHasTrap;
-var $proxyDerivedHasOwnTrap;
-var $proxyDerivedKeysTrap;
var $proxyDerivedSetTrap;
var $proxyEnumerate;
@@ -16,10 +13,19 @@ var $proxyEnumerate;
%CheckIsBootstrapping();
+// ----------------------------------------------------------------------------
+// Imports
+
var GlobalFunction = global.Function;
var GlobalObject = global.Object;
-// -------------------------------------------------------------------
+var ToNameArray;
+
+utils.Import(function(from) {
+ ToNameArray = from.ToNameArray;
+});
+
+//----------------------------------------------------------------------------
function ProxyCreate(handler, proto) {
if (!IS_SPEC_OBJECT(handler))
@@ -175,7 +181,7 @@ function ProxyEnumerate(proxy) {
if (IS_UNDEFINED(handler.enumerate)) {
return %Apply(DerivedEnumerateTrap, handler, [], 0, 0)
} else {
- return $toNameArray(handler.enumerate(), "enumerate", false)
+ return ToNameArray(handler.enumerate(), "enumerate", false)
}
}
@@ -185,17 +191,23 @@ var Proxy = new GlobalObject();
%AddNamedProperty(global, "Proxy", Proxy, DONT_ENUM);
//Set up non-enumerable properties of the Proxy object.
-$installFunctions(Proxy, DONT_ENUM, [
+utils.InstallFunctions(Proxy, DONT_ENUM, [
"create", ProxyCreate,
"createFunction", ProxyCreateFunction
])
-$proxyDelegateCallAndConstruct = DelegateCallAndConstruct;
+// -------------------------------------------------------------------
+// Exports
+
$proxyDerivedGetTrap = DerivedGetTrap;
$proxyDerivedHasTrap = DerivedHasTrap;
-$proxyDerivedHasOwnTrap = DerivedHasOwnTrap;
-$proxyDerivedKeysTrap = DerivedKeysTrap;
$proxyDerivedSetTrap = DerivedSetTrap;
$proxyEnumerate = ProxyEnumerate;
+utils.Export(function(to) {
+ to.ProxyDelegateCallAndConstruct = DelegateCallAndConstruct;
+ to.ProxyDerivedHasOwnTrap = DerivedHasOwnTrap;
+ to.ProxyDerivedKeysTrap = DerivedKeysTrap;
+});
+
})
« no previous file with comments | « src/promise.js ('k') | src/regexp.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698