Simplify IconLoader code
Categories
(Core :: Widget, task, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox87 | --- | fixed |
People
(Reporter: mstange, Assigned: mstange)
References
Details
Attachments
(16 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
There's some code around mozilla::widget::IconLoader
that's a little more complicated than it needs to be; there's a loader and a helper and a bunch of cycle collection.
In this bug I'm trying to remove the helper object and to stop using cycle collection for most of these objects by turning some owning references into non-owning references, so that there are fewer cycles.
Assignee | ||
Comment 1•3 years ago
|
||
Assignee | ||
Comment 2•3 years ago
|
||
Assignee | ||
Comment 3•3 years ago
|
||
Assignee | ||
Comment 4•3 years ago
|
||
Now IconLoader no longer has an unnecessary strong reference to the node.
Depends on D104619
Assignee | ||
Comment 5•3 years ago
|
||
This breaks another reference cycle.
Depends on D104620
Assignee | ||
Comment 6•3 years ago
|
||
It no longer needs to be cycle-collected because it doesn't have any strong
references to other cycle-collected objects anymore.
Depends on D104621
Assignee | ||
Comment 7•3 years ago
|
||
Depends on D104622
Assignee | ||
Comment 8•3 years ago
|
||
This breaks another strong reference cycle.
Depends on D104623
Assignee | ||
Comment 9•3 years ago
|
||
Depends on D104624
Assignee | ||
Comment 10•3 years ago
|
||
Depends on D104625
Assignee | ||
Comment 11•3 years ago
|
||
Depends on D104626
Assignee | ||
Comment 12•3 years ago
|
||
Depends on D104627
Assignee | ||
Comment 13•3 years ago
|
||
Depends on D104628
Assignee | ||
Comment 14•3 years ago
|
||
Depends on D104629
Assignee | ||
Comment 15•3 years ago
|
||
Depends on D104630
Assignee | ||
Comment 16•3 years ago
|
||
Depends on D104631
Assignee | ||
Comment 17•3 years ago
|
||
On Windows we were passing an empty rect to signal "entire image", and on macOS we can move the logic into MOZIconHelper.
Depends on D104632
Assignee | ||
Comment 18•3 years ago
|
||
This code seems to have been broken quite some time ago, but without adverse effect.
I have filed bug 1691868 so that a proper fix can be found.
In the meantime, this preserves the current behavior and is less confusing.
Depends on D104633
Comment 19•3 years ago
|
||
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/4c05e66763e2 Unified build fixes. r=mconley https://hg.mozilla.org/integration/autoland/rev/b26ff99675eb Remove IconLoader's mContent field, and pass the node to LoadURI instead. r=mconley https://hg.mozilla.org/integration/autoland/rev/ae78f34ef0c3 Make the mHelper field of IconLoader a non-owning reference, and make sure it's always cleared with a call to Destroy before the helper goes away. r=mconley https://hg.mozilla.org/integration/autoland/rev/7446edbd382c Make IconLoader not cycle-collected. r=mconley https://hg.mozilla.org/integration/autoland/rev/bcc29a743195 Make the mLoadListener field of IconLoaderHelperCocoa a weak pointer. r=mconley https://hg.mozilla.org/integration/autoland/rev/84ba3baf8242 Make the mLoadListener field of IconLoaderHelperWin a weak pointer. r=mconley https://hg.mozilla.org/integration/autoland/rev/c568b1b4d5a1 Make IconLoaderHelperWin not cycle-collected. r=mconley https://hg.mozilla.org/integration/autoland/rev/ce0f21bd123b IconLoader::Helper no longer needs to inherit from nsISupports, use inline refcounting for each helper subclass instead. r=mconley https://hg.mozilla.org/integration/autoland/rev/aa072284a77b Rename IconLoader::Helper to IconLoader::Listener. r=mconley https://hg.mozilla.org/integration/autoland/rev/b5706477c6d2 Stop using IconLoaderHelperWin and remove it. r=mconley https://hg.mozilla.org/integration/autoland/rev/ff63868de6d0 Move IconLoaderHelperCocoa functionality into a MOZIconHelper obj-c class. r=spohl https://hg.mozilla.org/integration/autoland/rev/5603767d8f01 Stop using IconLoaderHelperCocoa in nsMenuItemIconX. r=mconley https://hg.mozilla.org/integration/autoland/rev/30c26e68d0a5 Stop using IconLoaderHelperCocoa in nsTouchBarInputIcon. r=mconley https://hg.mozilla.org/integration/autoland/rev/e300fc03ec3e Remove IconLoaderHelperCocoa. r=mconley https://hg.mozilla.org/integration/autoland/rev/0eddb7e6a636 Move image region handling out of IconLoader. r=mconley https://hg.mozilla.org/integration/autoland/rev/bde601066f66 Remove unused mContentType fields. r=mconley
Comment 20•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/4c05e66763e2
https://hg.mozilla.org/mozilla-central/rev/b26ff99675eb
https://hg.mozilla.org/mozilla-central/rev/ae78f34ef0c3
https://hg.mozilla.org/mozilla-central/rev/7446edbd382c
https://hg.mozilla.org/mozilla-central/rev/bcc29a743195
https://hg.mozilla.org/mozilla-central/rev/84ba3baf8242
https://hg.mozilla.org/mozilla-central/rev/c568b1b4d5a1
https://hg.mozilla.org/mozilla-central/rev/ce0f21bd123b
https://hg.mozilla.org/mozilla-central/rev/aa072284a77b
https://hg.mozilla.org/mozilla-central/rev/b5706477c6d2
https://hg.mozilla.org/mozilla-central/rev/ff63868de6d0
https://hg.mozilla.org/mozilla-central/rev/5603767d8f01
https://hg.mozilla.org/mozilla-central/rev/30c26e68d0a5
https://hg.mozilla.org/mozilla-central/rev/e300fc03ec3e
https://hg.mozilla.org/mozilla-central/rev/0eddb7e6a636
https://hg.mozilla.org/mozilla-central/rev/bde601066f66
Description
•