diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-20 21:21:56 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-02-20 21:21:56 +0100 |
commit | 0c36b27511c1fbca594f0426c493ef601fda3e4c (patch) | |
tree | 6e801c0abb01391e6008a49f9d6c4ac4dd967cd8 /js/src/jsobj.cpp | |
parent | d77729916b4b9c2b67abd41181336c2cbb1da968 (diff) | |
download | UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.gz UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.lz UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.tar.xz UXP-0c36b27511c1fbca594f0426c493ef601fda3e4c.zip |
JS - support for Array.prototype.values()
Diffstat (limited to 'js/src/jsobj.cpp')
-rw-r--r-- | js/src/jsobj.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/js/src/jsobj.cpp b/js/src/jsobj.cpp index a39a4b0a0..2e36dcf9f 100644 --- a/js/src/jsobj.cpp +++ b/js/src/jsobj.cpp @@ -2936,6 +2936,11 @@ DefineFunctionFromSpec(JSContext* cx, HandleObject obj, const JSFunctionSpec* fs if (!PropertySpecNameToId(cx, fs->name, &id)) return false; + if (StandardProtoKeyOrNull(obj) == JSProto_Array && id == NameToId(cx->names().values)) { + if (!cx->options().arrayProtoValues()) + return true; + } + JSFunction* fun = NewFunctionFromSpec(cx, fs, id); if (!fun) return false; |