mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1113980 - Try to fix a bug with [[Set]] and old proxies. r=Waldo
This commit is contained in:
parent
47e92f2b3c
commit
453e2241bb
10
js/src/jit-test/tests/basic/bug1113980.js
Normal file
10
js/src/jit-test/tests/basic/bug1113980.js
Normal file
@ -0,0 +1,10 @@
|
||||
var p = Proxy.create({
|
||||
getOwnPropertyDescriptor: function() {
|
||||
return {value: 1, configurable: true, writable: true};
|
||||
},
|
||||
defineProperty: function() {
|
||||
}
|
||||
}, null);
|
||||
|
||||
var o = Object.create(p);
|
||||
o.a = 1;
|
@ -182,8 +182,10 @@ js::SetPropertyIgnoringNamedGetter(JSContext *cx, const BaseProxyHandler *handle
|
||||
}
|
||||
desc.value().set(vp.get());
|
||||
|
||||
if (descIsOwn)
|
||||
return handler->defineProperty(cx, receiver, id, desc);
|
||||
if (descIsOwn) {
|
||||
MOZ_ASSERT(desc.object() == proxy);
|
||||
return handler->defineProperty(cx, proxy, id, desc);
|
||||
}
|
||||
return JSObject::defineGeneric(cx, receiver, id, desc.value(),
|
||||
desc.getter(), desc.setter(), desc.attributes());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user