зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1206247 - Do not collect coverage information if the source has no filename. r=bhackett
This commit is contained in:
Родитель
dd33ee53bc
Коммит
deea2ccc60
|
@ -0,0 +1,4 @@
|
|||
evaluate("", {
|
||||
fileName: null
|
||||
});
|
||||
getLcovInfo();
|
|
@ -1955,8 +1955,12 @@ GenerateLcovInfo(JSContext* cx, JSCompartment* comp, GenericPrinter& out)
|
|||
for (ZonesIter zone(rt, SkipAtoms); !zone.done(); zone.next()) {
|
||||
for (ZoneCellIter i(zone, AllocKind::SCRIPT); !i.done(); i.next()) {
|
||||
JSScript* script = i.get<JSScript>();
|
||||
if (script->compartment() != comp || !script->isTopLevel())
|
||||
if (script->compartment() != comp ||
|
||||
!script->isTopLevel() ||
|
||||
!script->filename())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!topScripts.append(script))
|
||||
return false;
|
||||
|
|
|
@ -326,6 +326,10 @@ LCovCompartment::collectCodeCoverageInfo(JSCompartment* comp, JSObject* sso,
|
|||
void
|
||||
LCovCompartment::collectSourceFile(JSCompartment* comp, ScriptSourceObject* sso)
|
||||
{
|
||||
// Do not add sources if there is no file name associated to it.
|
||||
if (!sso->source()->filename())
|
||||
return;
|
||||
|
||||
// Skip any operation if we already some out-of memory issues.
|
||||
if (outTN_.hadOutOfMemory())
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче