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

Unified Diff: src/symbol.js

Issue 1149773003: Revert of Revert of Hook up more import/exports in natives. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/string-iterator.js ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/symbol.js
diff --git a/src/symbol.js b/src/symbol.js
index 0d9d905f2c1f8bb1f95f58338016c4a65ca1a16f..8ac7fe7011e896f47ecf45a1daa940a1b6ec76bd 100644
--- a/src/symbol.js
+++ b/src/symbol.js
@@ -18,8 +18,17 @@
%CheckIsBootstrapping();
+// -------------------------------------------------------------------
+// Imports
+
var GlobalObject = global.Object;
var GlobalSymbol = global.Symbol;
+
+var ObjectGetOwnPropertyKeys;
+
+utils.Import(function(from) {
+ ObjectGetOwnPropertyKeys = from.ObjectGetOwnPropertyKeys;
+});
// -------------------------------------------------------------------
@@ -73,7 +82,7 @@
// TODO(arv): Proxies use a shared trap for String and Symbol keys.
- return $objectGetOwnPropertyKeys(obj, PROPERTY_ATTRIBUTES_STRING);
+ return ObjectGetOwnPropertyKeys(obj, PROPERTY_ATTRIBUTES_STRING);
}
//-------------------------------------------------------------------
@@ -81,7 +90,7 @@
%SetCode(GlobalSymbol, SymbolConstructor);
%FunctionSetPrototype(GlobalSymbol, new GlobalObject());
-$installConstants(GlobalSymbol, [
+utils.InstallConstants(GlobalSymbol, [
// TODO(rossberg): expose when implemented.
// "hasInstance", symbolHasInstance,
// "isConcatSpreadable", symbolIsConcatSpreadable,
@@ -93,7 +102,7 @@
"unscopables", symbolUnscopables
]);
-$installFunctions(GlobalSymbol, DONT_ENUM, [
+utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [
"for", SymbolFor,
"keyFor", SymbolKeyFor
]);
@@ -103,12 +112,12 @@
%AddNamedProperty(
GlobalSymbol.prototype, symbolToStringTag, "Symbol", DONT_ENUM | READ_ONLY);
-$installFunctions(GlobalSymbol.prototype, DONT_ENUM, [
+utils.InstallFunctions(GlobalSymbol.prototype, DONT_ENUM, [
"toString", SymbolToString,
"valueOf", SymbolValueOf
]);
-$installFunctions(GlobalObject, DONT_ENUM, [
+utils.InstallFunctions(GlobalObject, DONT_ENUM, [
"getOwnPropertySymbols", ObjectGetOwnPropertySymbols
]);
« no previous file with comments | « src/string-iterator.js ('k') | src/third_party/fdlibm/fdlibm.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698