Closed Bug 1566850 Opened 5 years ago Closed 5 years ago

Convert `target.activeConsole` to `target.getFront("console")`

Categories

(DevTools :: Console, enhancement, P1)

enhancement

Tracking

(Fission Milestone:M6, firefox73 fixed)

RESOLVED FIXED
Firefox 73
Fission Milestone M6
Tracking Status
firefox73 --- fixed

People

(Reporter: ochameau, Assigned: nchevobbe)

References

Details

(Whiteboard: dt-fission-m1)

Attachments

(8 files, 1 obsolete file)

47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review
47 bytes, text/x-phabricator-request
Details | Review

ThreadFront and WebConsoleFront are the only two one left having a special codepath in TargetMixin.
These two are special as there is synchronous attributes on the target object, activeConsole and threadFront, in order to get a reference to them.
Their instantiation is also special as you have to call target.attachConsole as well as target.attachThread in order to create these attributes.
There is some discrepancies between these two and all the other one which are created on-demand on the first call to target.getFront:

In any case, we should distinguish the two following operation:

  • retrieving the front: target.getFront("xxx")
  • "attaching it": console.startListeners([]) and thread.attach(options)

A first iteration would be to do this split and use target.getFront everywhere.
Then, we could possibly iterate in order to cleanup the various way we are "attaching" these actors.

Why is this important to switch to getFront?

  • enable target.onFront to work with these two fronts. Fission is going to force us to support more than one front instance. In a near future, we are going to replace a few calls to getFront into calls to onFront. This step will be easier if we are already using getFront.
  • having a unified codebase. There is no reason but historical ones to have specifics around these two fronts.
Priority: -- → P1
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Attachment #9115100 - Attachment description: Bug 1566850 - Remove target.activeConsole usage in DOM panel. r=ochameau. → Bug 1566850 - Remove target.activeConsole usage in DOM panel. r=miker.
Attachment #9115104 - Attachment description: Bug 1566850 - Remove target.activeConsole usage in Netmonitor. r=ochameau. → Bug 1566850 - Remove target.activeConsole usage in Netmonitor. r=Honza.
Attachment #9115106 - Attachment description: Bug 1566850 - Remove target.activeConsole usage in Debugger. r=ochameau. → Bug 1566850 - Remove target.activeConsole usage in Debugger. r=jlast.
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1796a39b020b Remove target.activeConsole usage in DOM panel. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/33c4706a4255 Remove target.activeConsole usage in tests. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/55ac64d74725 Remove target.activeConsole usage in Netmonitor. r=Honza. https://hg.mozilla.org/integration/autoland/rev/4deadf97378f Remove target.activeConsole usage in Debugger. r=jlast. https://hg.mozilla.org/integration/autoland/rev/3c8ef35fde92 Remove target.activeConsole usage in WebConsole. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/b3aea303d3ed Remove target.activeConsole usage in Toolbox. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/da1672f831d1 Remove this.activeConsole in TargetMixin. r=ochameau.
Backout by shindli@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/535b50b4c504 Backed out 8 changesets (bug 1566850, bug 1603035) for causing perma bc failures in browser/components/extensions/test/browser/browser_ext_devtools_inspectedWindow.js CLOSED TREE

urgh sorry, missed on call site

Flags: needinfo?(nchevobbe)

Tracking Fission DevTools bugs for Fission Nightly (M6)

Fission Milestone: --- → M6
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b043364b1636 Remove target.activeConsole usage in DOM panel. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/63f43d73d53a Remove target.activeConsole usage in tests. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/368e030bee6e Remove target.activeConsole usage in Netmonitor. r=Honza. https://hg.mozilla.org/integration/autoland/rev/75e1e143cd8d Remove target.activeConsole usage in Debugger. r=jlast. https://hg.mozilla.org/integration/autoland/rev/ad57ea430417 Remove target.activeConsole usage in WebConsole. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/6bb8f7988396 Remove target.activeConsole usage in Toolbox. r=ochameau. https://hg.mozilla.org/integration/autoland/rev/8d07872ee7aa Remove target.activeConsole usage in devtools extension code. r=jdescottes,rpl. https://hg.mozilla.org/integration/autoland/rev/0f7053d36328 Remove this.activeConsole in TargetMixin. r=ochameau.
Whiteboard: dt-fission-m1
Attachment #9081187 - Attachment is obsolete: true
See Also: → 1618015
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: