Bug 908939 - Use the original function to construct the |this| type set in inline dispatch in Ion. (r=jandem)

This commit is contained in:
Shu-yu Guo 2013-08-27 16:01:54 -07:00
parent 57b9fa9ee2
commit cdab9c69e0
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
if (getBuildConfiguration().parallelJS) {
x = ParallelArray([9937], function() {
return /x/
})
Object.defineProperty(this, "y", {
get: function() {
return Object.create(x)
}
})
y + x
x = x.scatter([]);
+ y
}

View File

@ -4295,7 +4295,7 @@ IonBuilder::inlineCalls(CallInfo &callInfo, AutoObjectVector &targets,
if (maybeCache) {
JS_ASSERT(callInfo.thisArg() == maybeCache->object());
types::StackTypeSet *targetThisTypes =
maybeCache->propTable()->buildTypeSetForFunction(target);
maybeCache->propTable()->buildTypeSetForFunction(original);
if (!targetThisTypes)
return false;
maybeCache->object()->setResultTypeSet(targetThisTypes);