Bug 987111 - Proxy::set should create enumerable properties. r=efaust

Properties are supposed to be enumerable by default. It's unfortunate that
the default is reversed in SpiderMonkey.
This commit is contained in:
Bobby Holley 2014-06-04 15:12:26 -07:00
parent 16aa8bb904
commit dd53b3d419

View File

@ -2587,6 +2587,7 @@ Proxy::set(JSContext *cx, HandleObject proxy, HandleObject receiver, HandleId id
// that we're going to shadow. Make a property descriptor and define it.
Rooted<PropertyDescriptor> newDesc(cx);
newDesc.value().set(vp);
newDesc.setAttributes(JSPROP_ENUMERATE);
return handler->defineProperty(cx, receiver, id, &newDesc);
}