Bug 936361 - Fixup inlined no-freeze version of isOwnProperty, r=jandem.

This commit is contained in:
Brian Hackett 2013-11-08 08:57:31 -07:00
parent 03994c3d95
commit cc0d45fc19
2 changed files with 10 additions and 4 deletions

View File

@ -0,0 +1,3 @@
x = ParallelArray([1942], function() {})
x + watch.call(x, "length", (function() {}));

View File

@ -7609,11 +7609,14 @@ IonBuilder::objectsHaveCommonPrototype(types::TemporaryTypeSet *types, PropertyN
if (!isGetter && clasp->ops.setGeneric)
return false;
// Note: freezePropertiesForCommonPropFunc will freeze the property
// type sets later on if optimizing.
// Test for isOwnProperty() without freezing. If we end up
// optimizing, freezePropertiesForCommonPropFunc will freeze the
// property type sets later on.
types::HeapTypeSetKey property = type->property(NameToId(name));
if (property.maybeTypes() && !property.maybeTypes()->empty())
if (types::TypeSet *types = property.maybeTypes()) {
if (!types->empty() || types->configuredProperty())
return false;
}
if (JSObject *obj = type->singleton()) {
if (types::CanHaveEmptyPropertyTypesForOwnProperty(obj))
return false;