| Index: src/symbol.js
|
| diff --git a/src/symbol.js b/src/symbol.js
|
| index 9f2e563704a0e678f7001b839213941e050b13ea..78216767e1427e95ae3a3d1aed8f17783fea291e 100644
|
| --- a/src/symbol.js
|
| +++ b/src/symbol.js
|
| @@ -103,8 +103,8 @@ function SetUpSymbol() {
|
| // "hasInstance", symbolHasInstance,
|
| // "isConcatSpreadable", symbolIsConcatSpreadable,
|
| // "isRegExp", symbolIsRegExp,
|
| - "iterator", symbolIterator
|
| - // "toStringTag", symbolToStringTag,
|
| + "iterator", symbolIterator,
|
| + "toStringTag", symbolToStringTag
|
| // "unscopables", symbolUnscopables // added in unscopables.js
|
| ));
|
| InstallFunctions($Symbol, DONT_ENUM, $Array(
|
| @@ -121,6 +121,22 @@ function SetUpSymbol() {
|
|
|
| SetUpSymbol();
|
|
|
| +function addToStringTagProperty(obj, tag){
|
| + %AddNamedProperty(obj, symbolToStringTag, tag, DONT_ENUM | READ_ONLY);
|
| +}
|
| +
|
| +function setUpToStringTags(){
|
| + addToStringTagProperty(global.Math, "Math");
|
| + addToStringTagProperty(global.JSON, "JSON");
|
| + addToStringTagProperty($Symbol.prototype, "Symbol");
|
| + addToStringTagProperty(global.Promise.prototype, "Promise");
|
| + addToStringTagProperty(global.WeakMap.prototype, "WeakMap");
|
| + addToStringTagProperty(global.WeakSet.prototype, "WeakSet");
|
| + addToStringTagProperty(global.ArrayBuffer.prototype, "ArrayBuffer");
|
| + addToStringTagProperty(global.DataView.prototype, "DataView");
|
| +}
|
| +
|
| +setUpToStringTags();
|
|
|
| function ExtendObject() {
|
| %CheckIsBootstrapping();
|
|
|