зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b2e878846a
Коммит
cb607cf8b6
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче