Bug 861419 - Consider values in prototype when reading global names during Ion compilation.

This commit is contained in:
Brian Hackett 2013-04-14 06:40:58 -06:00
parent 09310478d5
commit 045c325da9
2 changed files with 19 additions and 0 deletions

View File

@ -5636,6 +5636,8 @@ IonBuilder::jsop_getgname(HandlePropertyName name)
// or non-writable.
return jsop_getname(name);
}
if (!propertyTypes->hasPropagatedProperty())
globalType->getFromPrototypes(cx, id, propertyTypes);
// If the property is permanent, a shape guard isn't necessary.

View File

@ -0,0 +1,17 @@
try {
arguments.toSource = (function() {
__proto__.y = x
})
y = this
print(x = 8)
a = arguments
for (v of this) {}
} catch (e) {}
function f() {
"HELLO " + y
}
f()
f()
y = 1[7]
f()