зеркало из 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.
|
||||
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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче