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

Unified Diff: src/symbol.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/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,9 +18,18 @@ var $symbolToString;
%CheckIsBootstrapping();
+// -------------------------------------------------------------------
+// Imports
+
var GlobalObject = global.Object;
var GlobalSymbol = global.Symbol;
+var ObjectGetOwnPropertyKeys;
+
+utils.Import(function(from) {
+ ObjectGetOwnPropertyKeys = from.ObjectGetOwnPropertyKeys;
+});
+
// -------------------------------------------------------------------
function SymbolConstructor(x) {
@@ -73,7 +82,7 @@ function ObjectGetOwnPropertySymbols(obj) {
// 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 @@ function ObjectGetOwnPropertySymbols(obj) {
%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 @@ $installConstants(GlobalSymbol, [
"unscopables", symbolUnscopables
]);
-$installFunctions(GlobalSymbol, DONT_ENUM, [
+utils.InstallFunctions(GlobalSymbol, DONT_ENUM, [
"for", SymbolFor,
"keyFor", SymbolKeyFor
]);
@@ -103,12 +112,12 @@ $installFunctions(GlobalSymbol, DONT_ENUM, [
%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