Open Bug 1478980 Opened 6 years ago Updated 2 years ago

JS code coverage randomly marks prototype method closing braces

Categories

(Core :: JavaScript Engine, defect, P3)

defect

Tracking

()

People

(Reporter: gabriel-v, Unassigned, NeedInfo)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

When viewing https://hg.mozilla.org/mozilla-central/file/4b7f106772af/toolkit/components/places/UnifiedComplete.js#l995 with code-coverage-addon, the following problem arises: the closing braces of prototype method declarations are sometimes reported as covered, sometimes reported as uncovered, and sometimes omitted from the coverage report. See attached screenshot: - line 995 not reported, - line 1013 covered, - line 1030 not reported. Further down in the same file and revision: - line 1906 uncovered, - line 1956 covered.
Confirmed. We use the same location information for code coverage that we use for error messages, stacks, and debugging. nbp, does this still happen? Do you think the location information is to blame, or something else about how we capture coverage data?
Flags: needinfo?(nicolas.b.pierron)
(In reply to Tudor-Gabriel Vijiala [:tvijiala] from comment #0) > When viewing > https://hg.mozilla.org/mozilla-central/file/4b7f106772af/toolkit/components/ > places/UnifiedComplete.js#l995 with code-coverage-addon Code Coverage addon?! I am not aware of any addon, do you have a link to it?
Flags: needinfo?(tvijiala)
Here's the adddon: https://addons.mozilla.org/en-US/firefox/addon/gecko-code-coverage/ Currently it works on phabricator in /D1234 type links.
Flags: needinfo?(tvijiala)
> Do you think the location information is to blame, or something else about how we capture > coverage data? I do not think this would be a problem of recording, as the code coverage is collected on jump targets and we assert against missing jump targets. It is likely to be an error in either the CodeCoverage.cpp writeScript iteration over the source notes, or a problem with the source notes compiled by the bytecode emitter. I will keep the needinfo to double check if there is an issue and attach a code coverage test case.
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: