Open
Bug 235640
Opened 21 years ago
Updated 2 years ago
nsXULElement don't like having their XPConnect wrapper reparented.
Categories
(Core :: DOM: Core & HTML, defect, P5)
Core
DOM: Core & HTML
Tracking
()
NEW
People
(Reporter: jst, Unassigned)
References
Details
Attachments
(1 file)
4.02 KB,
patch
|
Details | Diff | Splinter Review |
As evident in bug 233137, nsXULElement's don't having their XPConnect wrappers
reparented when they're moved from one document to another. Part of the reason
is probably the fact that a XUL elements nodeinfo is not always "correct",
sometime it's from the elements prototype, sometime it's from the original
document, which may not be the current document, etc. A big mess, to put it in
plain words.
Based on the numbers in bug 198533 comment 8 I think we should just go ahead and
make mNodeInfo a member of nsXULElement (and remove it from the
nsXULElement::Slots struct of course). I really doubt that an extra 6k added to
each window will be a noticable difference.
Other then bloat adding an mNodeInfo member could affect performance since we'll
have to get a nodeinfo object every time we create an dom-element around a
prototype. One way to lessen this could be to add a
virtual nsresult GetNodeInfo(nsINodeInfo* aNodeInfo, nsINodeInfo** aResult) = 0;
function to nsINodeInfoManager. This way we would be able to use the mInner
object inside aNodeInfo to do the hashlookup. Though in all honesty I doubt it'd
make a big difference. Maybe more important could be to deCOMtaminate
nsINodeInfoManager, i filed bug 236408 on that.
Depends on: 236408
Reporter | ||
Comment 2•21 years ago
|
||
If we do this (which it seems like we should), it might be worth making all
prototype documents share nodeinfo managers too, which would mean we'd have less
nodeinfo's in memory (since a window prototype element's nodeinfo would be
shared with another ones, etc), assuming we have more than one XUL prototype
document loaded, which seems very likely. :-)
Once petervs patch for bug 27382 is checked in it won't actually cause us any
bloat to move mNodeInfo into the xulelement. The reason is that having a real
mNodeInfo means that we'll be able to get rid of mDocument.
Depends on: 27382
Comment 4•21 years ago
|
||
Whoa! Sweet....
Comment 5•20 years ago
|
||
So... with bug 198533 fixed, are we now actually in a position to remove those
!newContent->IsContentOfType(eXUL) checks?
Comment 7•20 years ago
|
||
(In reply to comment #5)
> So... with bug 198533 fixed, are we now actually in a position to remove those
> !newContent->IsContentOfType(eXUL) checks?
I tested this and Bug 233137 was back :(
Comment 8•20 years ago
|
||
Any idea why? XUL elements have the right mNodeInfo now, no?
Comment 9•20 years ago
|
||
With this one I can't see Bug 233137, but I do get a lot of warnings:
WARNING: Moving XPConnect wrappedNative to new scope, but can't fixup
__proto__, file xpcwrappednative.cpp, line 1057
Most of those warnings come when opening the "Customize Toolbar" dialog.
jst, any idea? xpcwrappednative.cpp:1057 is possibly your code ;)
And yes, XUL elements should have right nodeinfo now.
/me continues debugging...
Comment 10•20 years ago
|
||
Does ReParentContentWrapper need to deal with the weirdness from
http://lxr.mozilla.org/seamonkey/source/dom/src/base/nsDOMClassInfo.cpp#5022 ?
Updated•15 years ago
|
Assignee: general → nobody
QA Contact: ian → general
Assignee | ||
Updated•12 years ago
|
Component: DOM: Mozilla Extensions → DOM
Comment 11•7 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Assignee | ||
Updated•6 years ago
|
Component: DOM → DOM: Core & HTML
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•