Closed Bug 300562 Opened 19 years ago Closed 19 years ago

XPCNativeWrappers can end up holding refs to other XPCNativeWrappers for too long

Categories

(Core :: XPConnect, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla1.8beta4

People

(Reporter: bzbarsky, Assigned: brendan)

References

Details

Attachments

(2 files, 1 obsolete file)

Blocks: 295937
Attached patch proposed fix, v2 (obsolete) (deleted) — Splinter Review
Thoughts: could we optimize the attribute case by using specialized, thinner get and set hooks? Should we add JSPROP_READONLY if the attribute is readonly? /be
Attachment #189140 - Flags: superreview?(shaver)
Attachment #189140 - Flags: review?(jst)
That patch fixes the issue for me.
Reviewers flush your queues! ;-) /be
Comment on attachment 189140 [details] [diff] [review] proposed fix, v2 r=jst
Attachment #189140 - Flags: review?(jst) → review+
Comment on attachment 189140 [details] [diff] [review] proposed fix, v2 sr=shaver. I think we should JSPROP_READONLY if the property is readonly, but we can do that in a follow-on.
Attachment #189140 - Flags: superreview?(shaver) → superreview+
Comment on attachment 189140 [details] [diff] [review] proposed fix, v2 self-approving, we need this for XPCNativeWrapper victory in 1.8/1.1. /be
Attachment #189140 - Flags: approval1.8b4+
Fixed. Not sure about the JSPROP_READONLY -- do I need a followup bug? I'll file something, or wiki at least. /be
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
jst points out that we want to try setting the wn attribute from the nw, so that we get high-fidelity XPConnect exception-throwing on readonly attribute, instead of bad ol' ECMA silent-failure-to-mutate-but-return-the-RHS-value-to-confuse-you behavior. /be
So... any idea why luna went orange?
No. I could back out and see if it goes green again. Anyone have access and the know-how to extract why the DHTMLTest: test failed? /be
Backed out, we'll see what luna does. /be
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Grrr, why would this break the DHTMLTest? I'll try to make time (new baby is nigh so I may not be able to). /be
Status: REOPENED → ASSIGNED
OS: Linux → All
Priority: -- → P1
Hardware: PC → All
Target Milestone: --- → mozilla1.8beta4
brendan, I ran into some major weirdness that I traced to this patch... if you load this testcase in a build with the patch and follow directions, the second click on the button does nothing. For some reason, the XPCWrappedNative that has the event handler defined on it gets garbage collected when that second window is opened... In fact, XPCWrappedNative preservation seems broken in general with this patch applied. :( (And yes, I meant XPCWrappedNative above, not XPCNativeWrapper. Why this patch affects XPCWrappedNatives, I do not know.)
Blocks: 281988
Depends on: 301316
OK, I think I know what's going on here... I filed bug 301316 on the problem.
Attached patch proposed fix, v3 (deleted) — Splinter Review
Testing help welcome, too. /be
Attachment #189140 - Attachment is obsolete: true
Attachment #189822 - Flags: superreview?(bzbarsky)
Attachment #189822 - Flags: review?(shaver)
Comment on attachment 189822 [details] [diff] [review] proposed fix, v3 r=shaver.
Attachment #189822 - Flags: review?(shaver) → review+
Comment on attachment 189822 [details] [diff] [review] proposed fix, v3 This patch doesn't fix the issue... when running with it, I get nativeExists false in almost all cases (including resolves of "firstChild", "nextSibling", etc, in particular).
Attachment #189822 - Flags: superreview?(bzbarsky) → superreview-
Checked in "proposed fix, v2" for brendan as requested.
I guess this was left for me to close. /be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: