Add Symbol to builtins

This commit is contained in:
Anthony Van de Gejuchte
2016-05-22 21:49:12 +02:00
committed by Richard van Velzen
parent 0357e5923f
commit 8ad8d7b717
2 changed files with 33 additions and 1 deletions

View File

@@ -44,10 +44,16 @@
"use strict";
function find_builtins() {
// Compatibility fix for es5.1 and earlier where Symbol isn't defined
if (!global.Symbol) {
global.Symbol = new Function();
}
var a = [];
[ Object, Array, Function, Number,
String, Boolean, Error, Math,
Date, RegExp
Date, RegExp, Symbol
].forEach(function(ctor){
Object.getOwnPropertyNames(ctor).map(add);
if (ctor.prototype) {