Bug 887521 - Fix OnUnknownMethod to not modify vp if there's no __noSuchMethod__ method. r=jwalden

This commit is contained in:
Jan de Mooij 2013-06-28 19:22:15 +02:00
parent 0cff4b3046
commit d19c3ad47f

View File

@ -212,9 +212,7 @@ js::OnUnknownMethod(JSContext *cx, HandleObject obj, Value idval_, MutableHandle
TypeScript::MonitorUnknown(cx);
if (value.get().isPrimitive()) {
vp.set(value);
} else {
if (value.isObject()) {
JSObject *obj = NewObjectWithClassProto(cx, &js_NoSuchMethodClass, NULL, NULL);
if (!obj)
return false;