mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Fix crash in ic::Name with weird scope chains (bug 616508, r=dmandelin).
This commit is contained in:
parent
4b36cd08d6
commit
c10306346a
9
js/src/jit-test/tests/jaeger/bug616508.js
Normal file
9
js/src/jit-test/tests/jaeger/bug616508.js
Normal file
@ -0,0 +1,9 @@
|
||||
// |jit-test| error: ReferenceError
|
||||
// vim: set ts=4 sw=4 tw=99 et:
|
||||
try {
|
||||
(function () {
|
||||
__proto__ = Uint32Array()
|
||||
}())
|
||||
} catch (e) {}(function () {
|
||||
length, ([eval()] ? x : 7)
|
||||
})()
|
@ -1477,17 +1477,16 @@ class ScopeNameCompiler : public PICStubCompiler
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!obj->isNative() || !holder->isNative()) {
|
||||
if (!obj->getProperty(cx, ATOM_TO_JSID(atom), vp))
|
||||
return false;
|
||||
} else {
|
||||
const Shape *shape = getprop.shape;
|
||||
JS_ASSERT(shape);
|
||||
JSObject *normalized = obj;
|
||||
if (obj->getClass() == &js_WithClass && !shape->hasDefaultGetter())
|
||||
normalized = js_UnwrapWithObject(cx, obj);
|
||||
NATIVE_GET(cx, normalized, holder, shape, JSGET_METHOD_BARRIER, vp, return false);
|
||||
}
|
||||
// If the property was found, but we decided not to cache it, then
|
||||
// take a slow path and do a full property fetch.
|
||||
if (!getprop.shape)
|
||||
return obj->getProperty(cx, ATOM_TO_JSID(atom), vp);
|
||||
|
||||
const Shape *shape = getprop.shape;
|
||||
JSObject *normalized = obj;
|
||||
if (obj->getClass() == &js_WithClass && !shape->hasDefaultGetter())
|
||||
normalized = js_UnwrapWithObject(cx, obj);
|
||||
NATIVE_GET(cx, normalized, holder, shape, JSGET_METHOD_BARRIER, vp, return false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user