Bug 1261826 part 10.1 - Baseline: Increment counter located at the entry point of a script. r=bhackett

This commit is contained in:
Nicolas B. Pierron 2016-05-23 14:21:51 +00:00
Родитель 976d4649f4
Коммит 9612d6cab8
1 изменённых файлов: 7 добавлений и 0 удалений

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

@ -992,6 +992,13 @@ OPCODE_LIST(EMIT_OP)
#undef EMIT_OP #undef EMIT_OP
} }
// If the main instruction is not a jump target, then we emit the
// corresponding code coverage counter.
if (pc == script->main() && !BytecodeIsJumpTarget(op)) {
if (!emit_JSOP_JUMPTARGET())
return Method_Error;
}
// Test if last instructions and stop emitting in that case. // Test if last instructions and stop emitting in that case.
pc += GetBytecodeLength(pc); pc += GetBytecodeLength(pc);
if (pc >= script->codeEnd()) if (pc >= script->codeEnd())