Closed Bug 1743044 Opened 3 years ago Closed 3 years ago

Duplicated Debugger.Source / SourceActor are created for inline script when html event handler or setTimeout strings are used

Categories

(DevTools :: Debugger, defect, P3)

defect

Tracking

(firefox-esr91 wontfix, firefox94 wontfix, firefox95 wontfix, firefox96 wontfix, firefox97 fixed)

RESOLVED FIXED
97 Branch
Tracking Status
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)).

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).

Assignee: nobody → poirot.alex
Status: NEW → ASSIGNED

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.

Set release status flags based on info from the regressing bug 1643540

Severity: -- → S3
Flags: needinfo?(jdescottes)
Priority: -- → P3
Pushed by apoirot@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ec7edd8a8e6 [devtools] Expand source's introductionType coverage. r=bomsy https://hg.mozilla.org/integration/autoland/rev/dd0d0dabb482 [devtools] Avoid instantiating duplicated Debugger.Source/SourceActor for inline scripts. r=bomsy
Backout by nerli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc3b66f34850 Backed out 2 changesets for causing failures in browser_resources_sources.js
Pushed by nerli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a354f00f3c6 [devtools] Expand source's introductionType coverage. r=bomsy https://hg.mozilla.org/integration/autoland/rev/209829160133 [devtools] Avoid instantiating duplicated Debugger.Source/SourceActor for inline scripts. r=bomsy CLOSED TREE

After further investigation, this seems to be just a high frequency: https://treeherder.mozilla.org/logviewer?job_id=360264824&repo=autoland&lineNumber=3707

Regressions: 1744565
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
Flags: needinfo?(jdescottes)
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: