mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 747245: Fix a silly weak reference assertion. r=bent a=mfinkle
This commit is contained in:
parent
569fa9dcee
commit
544801113f
@ -60,8 +60,10 @@ nsresult xpcJSWeakReference::Init(JSContext* cx, const JS::Value& object)
|
||||
// See if the object is a wrapped native that supports weak references.
|
||||
nsISupports* supports =
|
||||
nsXPConnect::GetXPConnect()->GetNativeOfWrapper(cx, &obj);
|
||||
if (supports) {
|
||||
mReferent = do_GetWeakReference(supports);
|
||||
nsCOMPtr<nsISupportsWeakReference> supportsWeakRef =
|
||||
do_QueryInterface(supports);
|
||||
if (supportsWeakRef) {
|
||||
supportsWeakRef->GetWeakReference(getter_AddRefs(mReferent));
|
||||
if (mReferent) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user