Bug 1583408 - Handle uncompleted scripts correctly in LCov code. r=nbp

When a JSScript is partially initialized we must detect this and not
generate coverage information. This incomplete script may still have an
entry in the ScriptLCovMap. The existing collectCodeCoverageInfo code
handled this correctly but the new CollectScriptCoverage function did
not.

Differential Revision: https://phabricator.services.mozilla.com/D46888

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Ted Campbell 2019-09-24 10:25:27 +00:00
parent dd45434783
commit 6a90d39a93

View File

@ -745,7 +745,9 @@ void CollectScriptCoverage(JSScript* script) {
}
LCovSource* source = p->value();
source->writeScript(script);
if (!script->isUncompleted()) {
source->writeScript(script);
}
map->remove(p);
}