Stop implementing JS-exposed QueryInterface on XUL tree objects
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
Attachments
(1 file)
nsTreeContentView
can only QI to nsISupports
and nsITreeView
, and nothing in JS QIs to nsITreeView
.
nsTreeColumns
only QIs to nsISupports
.
I tried adding a MOZ_CRASH in dom::QueryInterface
when the object is anything other than an element or window, and that crash is not hit in our tests (see https://treeherder.mozilla.org/#/jobs?repo=try&revision=0f45b9e009b38a8df79c04e4e42197e50e04b1a4), so I am guessing nothing ever QIs these tree objects.
![]() |
Assignee | |
Comment 1•2 years ago
|
||
Comment 2•2 years ago
|
||
Geoff, could you take a look at the ramifications of this. We've recently landed this: https://hg.mozilla.org/comm-central/rev/3004cd1a0a75
![]() |
Assignee | |
Updated•2 years ago
|
Updated•2 years ago
|
![]() |
Assignee | |
Comment 3•2 years ago
|
||
For comm-central, the line at https://searchfox.org/comm-central/rev/687b960093d4d527105ef9faaadeec9d6a535739/mailnews/base/util/jsTreeSelection.js#587 should probably just be removed, or have a try/catch around it.
Pushed by bzbarsky@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d3c19058cf40 Stop implementing JS-exposed QueryInterface for TreeColumns and TreeContentView. r=peterv
Comment 6•2 years ago
|
||
bugherder |
Description
•