diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-03-28 11:33:19 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-03-28 11:33:19 +0200 |
commit | dc8aad9b9dc6983bb88aa586f34d9db007840eb8 (patch) | |
tree | c8d904ea558af12c858ee6df1f9a08cfa11434e5 /js/src/jsobj.cpp | |
parent | 19b934070704c1ed12d3a75bc97752831d23f087 (diff) | |
parent | d990d8ab2cade6c928e8bbe56ae038d020cef599 (diff) | |
download | UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.gz UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.lz UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.tar.xz UXP-dc8aad9b9dc6983bb88aa586f34d9db007840eb8.zip |
Merge remote-tracking branch 'janek/_testBranch_js_array_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 33feb0a54..b17c845bb 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; |