Cleanup: remove NS_NATIVE_TMP_WINDOW
Categories
(Core :: Widget: Win32, task, P5)
Tracking
()
Tracking | Status | |
---|---|---|
firefox115 | --- | fixed |
People
(Reporter: rkraesig, Assigned: rkraesig)
Details
Attachments
(3 files)
GetNativeData(NS_NATIVE_TMP_WINDOW)
, unlike any other argument to GetNativeData
, creates a resource (which it returns as a void *
) and expects its callers to know that they need to destroy it, and how. At present, they do, but this is still something of a footgun.
We should couple and encapsulate the creation and destruction of this resource, and also take the opportunity to clean up some of the code adjacent thereto.
Assignee | ||
Comment 1•1 year ago
|
||
Simplify GetHWNDForDOMWindow
significantly:
-
Remove a 21-year-old code path [*] apparently intended to handle the
case of an embedded Gecko window.We can safely infer that this code path has been unused for at least
the last 13 years, when the patchset for bug 588735 introduced an
unconditional::DestroyWindow
of this function's return value.
(This would have been the embedded window in question, if this code
path had ever been taken.) -
Reduce remaining code to convert an
mozIDOMWindowProxy
to an
nsIWidget
via the presumably-better-tested mechanism used by the
color picker and file picker.
[*] Note that this code was moved in 2017 in a way that prevents
Searchfox from following it back. For archaeological purposes, a link to
its position at that time follows:
Assignee | ||
Comment 2•1 year ago
|
||
Rather than having nsWindow::GetNativeData()
sometimes (argument-
dependently) create a new resource and requiring its various callers to
destroy that resource, consolidate its creation and destruction into a
single external class.
No functional changes.
Depends on D177566
Assignee | ||
Comment 3•1 year ago
|
||
Remove nsIWidget::SetNativeData()
and all implementations thereof, as
none of them have had any functionality or use since bug 1338172.
No functional changes.
Depends on D177567
Comment 5•1 year ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/230b1c5897a9
https://hg.mozilla.org/mozilla-central/rev/56533b2afae5
https://hg.mozilla.org/mozilla-central/rev/23902d3b49d4
Description
•