зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287416 - Ensure we have enough ballast space in IonBuilder::inlineConstantStringSplitString. r=h4writer
This commit is contained in:
Родитель
aa4cf8af1e
Коммит
8eb3d73a81
|
@ -0,0 +1,3 @@
|
|||
for (var i = 0; i < 1; i++) {
|
||||
"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".split("x");
|
||||
};
|
|
@ -1492,11 +1492,14 @@ IonBuilder::inlineConstantStringSplitString(CallInfo& callInfo)
|
|||
// jsop_initelem_array is doing because we do not expect to bailout
|
||||
// because the memory is supposed to be allocated by now.
|
||||
for (uint32_t i = 0; i < initLength; i++) {
|
||||
MConstant* value = arrayValues[i];
|
||||
current->add(value);
|
||||
if (!alloc().ensureBallast())
|
||||
return InliningStatus_Error;
|
||||
|
||||
if (!initializeArrayElement(array, i, value, unboxedType, /* addResumePoint = */ false))
|
||||
return InliningStatus_Error;
|
||||
MConstant* value = arrayValues[i];
|
||||
current->add(value);
|
||||
|
||||
if (!initializeArrayElement(array, i, value, unboxedType, /* addResumePoint = */ false))
|
||||
return InliningStatus_Error;
|
||||
}
|
||||
|
||||
MInstruction* setLength = setInitializedLength(array, unboxedType, initLength);
|
||||
|
|
Загрузка…
Ссылка в новой задаче