Closed
Bug 861281
Opened 12 years ago
Closed 12 years ago
GC: Root the wrap object API
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla23
People
(Reporter: jonco, Assigned: jonco)
References
Details
Attachments
(1 file, 1 obsolete file)
15.31 KB,
patch
|
bholley
:
review+
|
Details | Diff | Splinter Review |
Here's a patch to root the wrapping callbacks set by JS_SetWrapObjectCallbacks().
Terrence I'm running this past you first before asking for review from others.
Attachment #736883 -
Flags: review?(terrence)
![]() |
||
Comment 1•12 years ago
|
||
Comment on attachment 736883 [details] [diff] [review]
Proposed changes
I'd somehwat prefer we make ReparentWrapper (and RescueOrphans) take handles instead of using a RootedObject here. Having the rooting at XPCWrappedNative::RescueOrphans (which has a marked object anyway) and nsNodeUtils::CloneAndAdopt (where it's getting the object out of something) would be a lot clearer.
Comment 2•12 years ago
|
||
Comment on attachment 736883 [details] [diff] [review]
Proposed changes
Review of attachment 736883 [details] [diff] [review]:
-----------------------------------------------------------------
Lets push the rooting of ReparentWrapper back one more level with this patch, as bz suggests. With that, this all looks excellent to me.
Attachment #736883 -
Flags: review?(terrence) → review+
Assignee | ||
Comment 3•12 years ago
|
||
(In reply to Boris Zbarsky (:bz) from comment #1)
Thanks for the comments.
I'll make ReparentWrapper take a handle, and RescueOrphans has already been changed in the meantime.
Unfortunately we still have to have a root in ReparentWrapper because aObj is assigned to.
Assignee | ||
Comment 4•12 years ago
|
||
Attachment #736883 -
Attachment is obsolete: true
Attachment #737438 -
Flags: review?(bobbyholley+bmo)
![]() |
||
Comment 5•12 years ago
|
||
I wonder how evil it would be to have ReparentWrapper take a mutable handle..
It probably doesn't matter much, though. Might be worth a comment in ReparentWrapper about why we're rooting again.
Comment 6•12 years ago
|
||
Comment on attachment 737438 [details] [diff] [review]
Proposed changes v2
Review of attachment 737438 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/xpconnect/wrappers/WrapperFactory.cpp
@@ +130,2 @@
> {
> + RootedObject scope(cx, scopeArg);
Rather than doing the scopeArg dance here, let's just make something new to pass to PreCreate (since we need access to the original one anyway).
Attachment #737438 -
Flags: review?(bobbyholley+bmo) → review+
Assignee | ||
Comment 7•12 years ago
|
||
Patch updated and landed on unbound:
https://hg.mozilla.org/integration/mozilla-inbound/rev/3fa225a54135
Comment 8•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla23
Assignee | ||
Updated•12 years ago
|
Blocks: 773686
Keywords: dev-doc-needed
Updated•5 years ago
|
Keywords: dev-doc-needed
You need to log in
before you can comment on or make changes to this bug.
Description
•