Bug 939015 - Fix incorrect error propagation in {get,lookup}ChildProperty. (r=bhackett)

This commit is contained in:
Shu-yu Guo 2013-11-27 09:53:43 -08:00
parent 29990f52e3
commit 1b5a3b9755

View File

@ -397,7 +397,7 @@ JSObject::getChildProperty(ExclusiveContext *cx,
StackShape::AutoRooter childRoot(cx, &child);
RootedShape shape(cx, getChildPropertyOnDictionary(cx, obj, parent, child));
if (!shape) {
if (!obj->inDictionaryMode()) {
shape = cx->compartment()->propertyTree.getChild(cx, parent, obj->numFixedSlots(), child);
if (!shape)
return nullptr;
@ -419,7 +419,7 @@ JSObject::lookupChildProperty(ThreadSafeContext *cx,
RootedShape shape(cx, getChildPropertyOnDictionary(cx, obj, parent, child));
if (!shape) {
if (!obj->inDictionaryMode()) {
shape = cx->compartment_->propertyTree.lookupChild(cx, parent, child);
if (!shape)
return nullptr;