mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
[INFER] Scan entire prototype chain for a lookupProperty hook when nop-ing accesses on singleton objects, bug 673788.
This commit is contained in:
parent
f3f515f0f4
commit
568dfb4413
10
js/src/jit-test/tests/jaeger/bug673788.js
Normal file
10
js/src/jit-test/tests/jaeger/bug673788.js
Normal file
@ -0,0 +1,10 @@
|
||||
// |jit-test| error: ReferenceError
|
||||
p = Proxy.create({
|
||||
has: function() {}
|
||||
})
|
||||
Object.prototype.__proto__ = p
|
||||
n = [];
|
||||
(function() {
|
||||
var a = [];
|
||||
if (b) t = a.s()
|
||||
})()
|
@ -4622,10 +4622,14 @@ mjit::Compiler::testSingletonProperty(JSObject *obj, jsid id)
|
||||
* properties to be explicitly marked with undefined.
|
||||
*/
|
||||
|
||||
if (!obj->isNative())
|
||||
return false;
|
||||
if (obj->getClass()->ops.lookupProperty)
|
||||
return false;
|
||||
JSObject *nobj = obj;
|
||||
while (nobj) {
|
||||
if (!nobj->isNative())
|
||||
return false;
|
||||
if (nobj->getClass()->ops.lookupProperty)
|
||||
return false;
|
||||
nobj = nobj->getProto();
|
||||
}
|
||||
|
||||
JSObject *holder;
|
||||
JSProperty *prop = NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user