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
Родитель 65a40b5804
Коммит 3345b24b2d
1 изменённых файлов: 1 добавлений и 3 удалений

Просмотреть файл

@ -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;