Bug 1050094 - Watch for null entry resume point when emitting script counts, r=nbp.

This commit is contained in:
Brian Hackett 2014-08-08 07:17:38 -08:00
parent f1d2262570
commit 328e190a8a

View File

@ -3124,10 +3124,11 @@ CodeGenerator::maybeCreateScriptCounts()
// Find a PC offset in the outermost script to use. If this block
// is from an inlined script, find a location in the outer script
// to associate information about the inlining with.
MResumePoint *resume = block->entryResumePoint();
while (resume->caller())
resume = resume->caller();
offset = script->pcToOffset(resume->pc());
if (MResumePoint *resume = block->entryResumePoint()) {
while (resume->caller())
resume = resume->caller();
offset = script->pcToOffset(resume->pc());
}
}
if (!counts->block(i).init(block->id(), offset, block->numSuccessors())) {