зеркало из https://github.com/mozilla/pjs.git
Bug 747245: Fix a silly weak reference assertion. r=bent a=mfinkle
This commit is contained in:
Родитель
b1a0514299
Коммит
92426a49b8
|
@ -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.
|
// See if the object is a wrapped native that supports weak references.
|
||||||
nsISupports* supports =
|
nsISupports* supports =
|
||||||
nsXPConnect::GetXPConnect()->GetNativeOfWrapper(cx, &obj);
|
nsXPConnect::GetXPConnect()->GetNativeOfWrapper(cx, &obj);
|
||||||
if (supports) {
|
nsCOMPtr<nsISupportsWeakReference> supportsWeakRef =
|
||||||
mReferent = do_GetWeakReference(supports);
|
do_QueryInterface(supports);
|
||||||
|
if (supportsWeakRef) {
|
||||||
|
supportsWeakRef->GetWeakReference(getter_AddRefs(mReferent));
|
||||||
if (mReferent) {
|
if (mReferent) {
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче