Bug 964915 part 5 - Add some comments to BaselineIC.cpp to warn about outerization. r=bz

This commit is contained in:
Jan de Mooij 2014-05-08 16:52:41 +02:00
Родитель 9dabe955bf
Коммит 15efa5873c
1 изменённых файлов: 7 добавлений и 0 удалений

Просмотреть файл

@ -5688,6 +5688,9 @@ TryAttachGlobalNameStub(JSContext *cx, HandleScript script, jsbytecode *pc,
return true;
}
// Try to add a getter stub. We don't handle scripted getters yet; if this
// changes we need to make sure IonBuilder::getPropTryCommonGetter (which
// requires a Baseline stub) handles non-outerized this objects correctly.
bool isScripted;
if (IsCacheableGetPropCall(cx, global, global, shape, &isScripted) && !isScripted)
{
@ -5741,6 +5744,10 @@ TryAttachScopeNameStub(JSContext *cx, HandleScript script, ICGetName_Fallback *s
scopeChain = scopeChain->enclosingScope();
}
// We don't handle getters here. When this changes, we need to make sure
// IonBuilder::getPropTryCommonGetter (which requires a Baseline stub to
// work) handles non-outerized this objects correctly.
if (!IsCacheableGetPropReadSlot(scopeChain, scopeChain, shape))
return true;