Closed
Bug 327716
Opened 20 years ago
Closed 20 years ago
XPC_NW_NewResolve should root its cloned function object
Categories
(Core :: XPConnect, defect, P1)
Tracking
()
RESOLVED
FIXED
People
(Reporter: dbaron, Assigned: dbaron)
References
Details
(Keywords: fixed1.8.0.4, fixed1.8.1, Whiteboard: [patch])
Attachments
(1 file)
|
1.09 KB,
patch
|
jst
:
review+
brendan
:
superreview+
jst
:
approval-branch-1.8.1+
jay
:
approval1.8.0.4+
|
Details | Diff | Splinter Review |
XPC_NW_NewResolve clones a function object and passes it to WrapFunction, which creates another function, which means the first one can be destroyed:
js_GC (/builds/trunk/mozilla/js/src/jsgc.c:1947)
js_NewGCThing (/builds/trunk/mozilla/js/src/jsgc.c:635)
js_NewObject (/builds/trunk/mozilla/js/src/jsobj.c:2008)
js_NewFunction (/builds/trunk/mozilla/js/src/jsfun.c:2030)
JS_NewFunction (/builds/trunk/mozilla/js/src/jsapi.c:3403)
WrapFunction (/builds/trunk/mozilla/js/src/xpconnect/src/XPCNativeWrapper.cpp:236)
XPC_NW_NewResolve (/builds/trunk/mozilla/js/src/xpconnect/src/XPCNativeWrapper.cpp:860)
| Assignee | ||
Comment 1•20 years ago
|
||
Not sure whether this is the best approach, but it works.
Attachment #212311 -
Flags: review?(jst)
| Assignee | ||
Updated•20 years ago
|
Assignee: dbradley → dbaron
Priority: -- → P1
Whiteboard: [patch]
| Assignee | ||
Updated•20 years ago
|
Attachment #212311 -
Flags: superreview?(brendan)
Comment 2•20 years ago
|
||
Comment on attachment 212311 [details] [diff] [review]
possible patch
Sure, that will work and seems necessary in general (alas).
Again it might be better to root as soon as possible, so even before the DEBUG_XPCNativeWrapper paragraph.
/be
Attachment #212311 -
Flags: superreview?(brendan) → superreview+
Comment 3•20 years ago
|
||
Comment on attachment 212311 [details] [diff] [review]
possible patch
r=jst
Attachment #212311 -
Flags: review?(jst) → review+
| Assignee | ||
Comment 4•20 years ago
|
||
Checked in to trunk.
| Assignee | ||
Updated•20 years ago
|
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•20 years ago
|
Attachment #212311 -
Flags: approval1.8.0.3?
Attachment #212311 -
Flags: approval-branch-1.8.1?(jst)
Updated•20 years ago
|
Attachment #212311 -
Flags: approval-branch-1.8.1?(jst) → approval-branch-1.8.1+
Comment 6•20 years ago
|
||
Comment on attachment 212311 [details] [diff] [review]
possible patch
Please check in promptly on the 1.8.0 branch. Thanks!
Attachment #212311 -
Flags: approval1.8.0.3? → approval1.8.0.3+
You need to log in
before you can comment on or make changes to this bug.
Description
•