зеркало из https://github.com/mozilla/pjs.git
retain the target and userData for our remote data callbacks, including
site icon notification. fixes crash where target of notification would go away and we'd try to directly send it a notification (bug 231844)
This commit is contained in:
Родитель
8e085c81b9
Коммит
8369b8c5ac
|
@ -66,11 +66,15 @@ public:
|
|||
, mURI(inURI)
|
||||
{
|
||||
[mLoadListener retain];
|
||||
[mTarget retain];
|
||||
[mUserData retain];
|
||||
}
|
||||
|
||||
virtual ~StreamLoaderContext()
|
||||
{
|
||||
[mLoadListener release];
|
||||
[mTarget release];
|
||||
[mUserData release];
|
||||
}
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -80,9 +84,11 @@ public:
|
|||
|
||||
protected:
|
||||
|
||||
// we have to retain all of these so that by the time the necko request completes, the target
|
||||
// to which we send the notification (|mTarget|) and its "parameters" (|mUserData|) are still around.
|
||||
id<RemoteLoadListener> mLoadListener; // retained
|
||||
id mTarget; // not retained
|
||||
id mUserData; // not retained
|
||||
id mTarget; // retained
|
||||
id mUserData; // retained
|
||||
nsString mURI;
|
||||
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче