Closed
Bug 270345
Opened 20 years ago
Closed 20 years ago
nsIDocShellTreeItem's parent and treeOwner attributes are not scriptable
Categories
(Core :: DOM: Navigation, defect)
Core
DOM: Navigation
Tracking
()
RESOLVED
FIXED
mozilla1.8beta1
People
(Reporter: darin.moz, Assigned: darin.moz)
Details
Attachments
(1 file)
2.13 KB,
patch
|
Biesinger
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
nsIDocShellTreeItem's parent and treeOwner attributes are not scriptable To be precise, it is the setters for these attributes that are not scriptable. They store pointers to the given interface pointers without calling AddRef! :( It would be very bad if someone tried to assign a value to either of these from JS or some other nsXPTCStub-based language binding.
Assignee | ||
Comment 1•20 years ago
|
||
simple patch (browser.js actually reads the treeOwner attribute)
Assignee | ||
Updated•20 years ago
|
Attachment #166204 -
Flags: superreview?(bzbarsky)
Attachment #166204 -
Flags: review?(cbiesinger)
Assignee | ||
Updated•20 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.8beta
Updated•20 years ago
|
Attachment #166204 -
Flags: superreview?(bzbarsky) → superreview+
Comment 2•20 years ago
|
||
Comment on attachment 166204 [details] [diff] [review] v1 patch ok, r=biesi, but this seems to be somewhat ugly... can we keep an nsIWeakReference or something here, instead of having to mark this noscript?
Attachment #166204 -
Flags: review?(cbiesinger) → review+
Assignee | ||
Comment 3•20 years ago
|
||
it is ugly, but i don't have time to fix it properly. if you want to cut a patch, please do. currently, we don't have any script callers, and it would seem there is no need for script callers :-/
actually, i can think of some people who would want to use this...
Assignee | ||
Comment 5•20 years ago
|
||
timeless: examples?
Assignee | ||
Comment 7•20 years ago
|
||
Well, then his code must result in crashes or other badness.
Comment 9•20 years ago
|
||
This patch does not affect my code, not at least for now.
Assignee | ||
Comment 10•20 years ago
|
||
fixed-on-trunk
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Comment 11•20 years ago
|
||
Just a heads-up -- I plan to remove the ability to set the parent on this interface in the very near future. I'm not sure about the treeowner yet.... We really want to only allow setting it on "root" docshells, somehow.
Comment 12•20 years ago
|
||
ah, good - that makes comment 2 and comment 3 moot, it seems.
You need to log in
before you can comment on or make changes to this bug.
Description
•