Duplicated Debugger.Source / SourceActor are created for inline script when html event handler or setTimeout strings are used
Categories
(DevTools :: Debugger, defect, P3)
Tracking
(firefox-esr91 wontfix, firefox94 wontfix, firefox95 wontfix, firefox96 wontfix, firefox97 fixed)
People
(Reporter: ochameau, Assigned: ochameau)
References
(Regression)
Details
(Keywords: regression)
Attachments
(2 files)
While working on bug 1569859, I was struggling with broken breakpoints around inline scripts.
And then, I wanted to extend the code coverage around them, but hit some issues around the "resurect source" code. This code has been regressed in bug 1643540 and we ended up creating duplicated Debugger.Source objects as well as duplicated SourceActors which were sent to the frontend.
It isn't clear how the frontend was handling this situation. May be it workaround that and no major breakage were introduced?
But this prevents writing decent tests involving html event handler (<div onclick="foo()">
and setTimeout using strings to define the callback (setTimeout("foo()", 25)
).
Assignee | ||
Comment 1•3 years ago
|
||
I'm adding one test for each Debugger.Source's introductionType
which was not covered yet.
Except for eventHandler and domTimer, which require some additional fix (see next changeset).
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Regression from bug 1643540.
Debugger.findSourceURLs is recording all sources except the one having an introductionScript
defined.
i.e. the one being added dynamically and not part of the original HTML content (at least that the expectation of findSourceURLs)
It is important to use the same filtering in ThreadActor, otherwise we may not populate urlMap
correctly and call resurrectSource for sources that were recorded by findSourceURLs.
This would introduce duplicated Debugger.Source and SourceActor for the same URL.
Updated•3 years ago
|
Comment 3•3 years ago
|
||
Set release status flags based on info from the regressing bug 1643540
Updated•3 years ago
|
Updated•3 years ago
|
Comment 7•3 years ago
|
||
After further investigation, this seems to be just a high frequency: https://treeherder.mozilla.org/logviewer?job_id=360264824&repo=autoland&lineNumber=3707
Comment 8•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/7a354f00f3c6
https://hg.mozilla.org/mozilla-central/rev/209829160133
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•