diff options
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; |