Fix bug 316025 -- no need to create a wrapper on plugin teardown if we don't

have one already.  r+sr=jst


git-svn-id: svn://10.0.0.236/trunk@184477 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-11-11 20:38:41 +00:00
parent 6b9c2499d9
commit 9b767b43fc

View File

@@ -1409,10 +1409,11 @@ nsJSNPRuntime::OnPluginDestroy(NPP npp)
return;
}
nsCOMPtr<nsIXPConnectJSObjectHolder> holder;
xpc->WrapNative(cx, ::JS_GetGlobalObject(cx), element,
NS_GET_IID(nsIDOMElement),
getter_AddRefs(holder));
nsCOMPtr<nsISupports> supp(do_QueryInterface(element));
nsCOMPtr<nsIXPConnectWrappedNative> holder;
xpc->GetWrappedNativeOfNativeObject(cx, ::JS_GetGlobalObject(cx), supp,
NS_GET_IID(nsISupports),
getter_AddRefs(holder));
if (!holder) {
return;
}