remove public DOMEventTargetHelper::BindToOwner() rebind methods
Categories
(Core :: DOM: Events, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox78 | --- | fixed |
People
(Reporter: karlt, Assigned: karlt)
References
Details
Attachments
(6 files)
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 |
DOMEventTargetHelper::BindToOwner()
documentation says that it "is only called on rebind", but
- Rebinding is never performed, and
- It is called for cases that are not rebinds.
https://hg.mozilla.org/mozilla-central/rev/0c35057e2bb41d3440942338b5ad3c7d9c2a3345#l8.64 introduced the BindToOwner()
methods, including support for rebinding to a different window, but all of the call sites seem to have bound a new object.
https://hg.mozilla.org/integration/mozilla-inbound/rev/cda31f55d8ca1e84bee52d9b5ca2f6820c08cf50 for https://bugzilla.mozilla.org/show_bug.cgi?id=1450266#c17 added invocations of BindToOwner()
from nsGlobalWindowOuter::SetNewDocument().
At that revision also, all other calls seem to be on new objects.
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3b3fac9a495#l3.47 moved BindToOwner()
calls from SetNewDocument()
to nsGlobalWindowInner::MigrateStateForDocumentOpen().
https://bugzilla.mozilla.org/show_bug.cgi?id=1451913#c55 said
"Note, my hope is that one day we can implement bug 1449992 and this entire mechanism can go away."
https://hg.mozilla.org/integration/mozilla-inbound/rev/3baa317d82f5#l2.63 introduced the documentation.
https://hg.mozilla.org/mozilla-central/rev/a01586b62cf5#l1.92 removed MigrateStateForDocumentOpen().
BindToOwner()
is now unnecessary as all remaining uses can be covered by passing the relevant object to the DOMEventTargetHelper
constructor.
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
Assignee | ||
Comment 2•4 years ago
|
||
WorkerGlobalScopeBase has no override for BindToOwner()
, so there is no need
for the virtual call.
The DOMEventTargetHelper(nsIGlobalObject*) constructor is not suitable here
because the nsIGlobalObject would not have been constructed when the
DOMEventTargetHelper constructor would need it.
Depends on D75037
Assignee | ||
Comment 3•4 years ago
|
||
Depends on D75039
Assignee | ||
Comment 4•4 years ago
|
||
Depends on D75041
Assignee | ||
Comment 5•4 years ago
|
||
Depends on D75042
Assignee | ||
Comment 6•4 years ago
|
||
This method can be and is used by derived classes as well as DOMEventTargetHelper
itself, so it does not need to be "Internal".
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/3c7e244b3d5b
https://hg.mozilla.org/mozilla-central/rev/96df7fe7497f
Comment 10•4 years ago
|
||
bugherder |
Description
•