Closed Bug 484692 Opened 15 years ago Closed 15 years ago

Set/clear cached wrappers from within XPConnect

Categories

(Core :: XPConnect, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.1b4

People

(Reporter: peterv, Assigned: peterv)

References

Details

(Keywords: fixed1.9.1)

Attachments

(2 files)

Currently we do that from various PostCreate/Finalize hooks in nsDOMClassInfo, but we should really do it inside XPConnect. For setting we already have a pointer to the nsWrapperCache and for clearing the additional QI shouldn't cost much more than the virtual call to the Finalize hook. This will probably also help with slimwrappers, since we could then avoid setting the wrapper again after morphing.
Attached patch v1Splinter Review
Attachment #368800 - Flags: superreview?(jst)
Attachment #368800 - Flags: review?(jst)
With this, you can get rid of the recently added DocumentFragmentSH, which exists for the sole purpose of doing the wrapper dance.
Ah, yes. Jst: when reviewing please assume the patch includes a backout of http://hg.mozilla.org/mozilla-central/rev/825869c4798a :-).
I think we should actually take this patch on branch to fix bug 480975, instead of the patch in that bug. I don't think there are any other classes that have the same problem, but this patch fixes them if we do.
Flags: blocking1.9.1?
Comment on attachment 368800 [details] [diff] [review]
v1

r+sr=jst
Attachment #368800 - Flags: superreview?(jst)
Attachment #368800 - Flags: superreview+
Attachment #368800 - Flags: review?(jst)
Attachment #368800 - Flags: review+
Blocking (and unblocked on bug 480975).
Flags: blocking1.9.1? → blocking1.9.1+
Priority: -- → P1
Target Milestone: mozilla1.9.2a1 → mozilla1.9.1b4
http://hg.mozilla.org/mozilla-central/rev/1e484f30d821
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Attached patch Error checkSplinter Review
QI isn't required to zero its outparam on failure, is it?
Attachment #369252 - Flags: superreview?(jst)
Attachment #369252 - Flags: review?(jst)
Comment on attachment 369252 [details] [diff] [review]
Error check

No, most implementations do. I'll land this on branch with the other patch.
Attachment #369252 - Flags: superreview?(jst)
Attachment #369252 - Flags: superreview+
Attachment #369252 - Flags: review?(jst)
Attachment #369252 - Flags: review+
Comment on attachment 369252 [details] [diff] [review]
Error check

Pushed changeset bff47eac99af to mozilla-central.
I backed this out on branch again to try to resolve some sporadic orange, see bug 486271. No clue what's going on.
Keywords: fixed1.9.1
Tried to reproduce the orange locally, but can't. Running under purify didn't give any clues either.
Depends on: 486585
The problem turned out to be removal of the WANT_FINALIZE flag from NODE_SCRIPTABLE_FLAGS. Because the fix for bug 480389 wasn't landed on branch we still have a Finalize hook in nsDocumentSH, and so we need to add WANT_FINALIZE to DOCUMENT_SCRIPTABLE_FLAGS.
Keywords: fixed1.9.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: