mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952660, part 8 - Insert non-root wrappers into the list in the constructor for nsXPCWrappedJS. r=bholley
A non-root wrapper has to be inserted into the list. There's only one place this is needed, but I think it makes more sense like this.
This commit is contained in:
parent
663d876a37
commit
308a7aade6
@ -391,9 +391,6 @@ nsXPCWrappedJS::GetNewOrUsed(JS::HandleObject jsObj,
|
||||
|
||||
wrapper = new nsXPCWrappedJS(cx, jsObj, clazz, root);
|
||||
|
||||
wrapper->mNext = root->mNext;
|
||||
root->mNext = wrapper;
|
||||
|
||||
if (release_root)
|
||||
NS_RELEASE(root);
|
||||
|
||||
@ -418,9 +415,11 @@ nsXPCWrappedJS::nsXPCWrappedJS(JSContext* cx,
|
||||
NS_ADDREF_THIS();
|
||||
NS_ADDREF_THIS();
|
||||
|
||||
if (!IsRootWrapper())
|
||||
if (!IsRootWrapper()) {
|
||||
NS_ADDREF(mRoot);
|
||||
|
||||
mNext = mRoot->mNext;
|
||||
mRoot->mNext = this;
|
||||
}
|
||||
}
|
||||
|
||||
nsXPCWrappedJS::~nsXPCWrappedJS()
|
||||
|
Loading…
Reference in New Issue
Block a user