mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 868890 - Correctly generate barrier when accessing undefined properties of objects whose prototype also has the property, r=dvander.
This commit is contained in:
parent
2cb09b0e04
commit
ad89a86451
@ -2420,13 +2420,16 @@ ion::PropertyReadNeedsTypeBarrier(JSContext *cx, types::TypeObject *object, Prop
|
||||
if (!TypeSetIncludes(observed, MIRType_Value, property))
|
||||
return true;
|
||||
|
||||
// Type information for global objects does not reflect the initial
|
||||
// 'undefined' value of variables declared with 'var'. Until the variable
|
||||
// is assigned a value other than undefined, a barrier is required.
|
||||
if (property->empty() && name && object->singleton && object->singleton->isNative()) {
|
||||
// Type information for singleton objects is not required to reflect the
|
||||
// initial 'undefined' value for native properties, in particular global
|
||||
// variables declared with 'var'. Until the property is assigned a value
|
||||
// other than undefined, a barrier is required.
|
||||
if (name && object->singleton && object->singleton->isNative()) {
|
||||
Shape *shape = object->singleton->nativeLookup(cx, name);
|
||||
if (shape && shape->hasDefaultGetter()) {
|
||||
JS_ASSERT(object->singleton->nativeGetSlot(shape->slot()).isUndefined());
|
||||
if (shape &&
|
||||
shape->hasDefaultGetter() &&
|
||||
object->singleton->nativeGetSlot(shape->slot()).isUndefined())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user