Bug 1419758 - Don't attach a constructing stub if the callee doesn't have JIT code yet. r=bbouvier

This commit is contained in:
Jan de Mooij 2017-11-28 16:53:01 +01:00
Родитель b82282fd5b
Коммит e001275fd0
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -2213,6 +2213,14 @@ TryAttachCallStub(JSContext* cx, ICCall_Fallback* stub, HandleScript script, jsb
return true;
}
// If we're constructing, require the callee to have JIT code. This
// isn't required for correctness but avoids allocating a template
// object below for constructors that aren't hot. See bug 1419758.
if (constructing && !fun->hasJITCode()) {
*handled = true;
return true;
}
// Check if this stub chain has already generalized scripted calls.
if (stub->scriptedStubsAreGeneralized()) {
JitSpew(JitSpew_BaselineIC, " Chain already has generalized scripted call stub!");