Bug 978236 - Implement Proxy.[[DefineProperty]] to ES6 standard. (r=jorendorff)

This commit is contained in:
Eric Faust
2014-06-03 13:00:59 -07:00
parent 20e8b58f93
commit 73c54a35b9
3 changed files with 109 additions and 119 deletions

View File

@@ -1049,10 +1049,6 @@ js::DefineProperty(JSContext *cx, HandleObject obj, HandleId id, const PropDesc
}
if (obj->getOps()->lookupGeneric) {
/*
* FIXME: Once ScriptedIndirectProxies are removed, this code should call
* TrapDefineOwnProperty directly
*/
if (obj->is<ProxyObject>()) {
RootedValue pd(cx, desc.descriptorValue());
return Proxy::defineProperty(cx, obj, id, pd);
@@ -1135,10 +1131,6 @@ js::DefineProperties(JSContext *cx, HandleObject obj, HandleObject props)
}
if (obj->getOps()->lookupGeneric) {
/*
* FIXME: Once ScriptedIndirectProxies are removed, this code should call
* TrapDefineOwnProperty directly
*/
if (obj->is<ProxyObject>()) {
for (size_t i = 0, len = ids.length(); i < len; i++) {
RootedValue pd(cx, descs[i].descriptorValue());