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:
pinkerton%aol.net 2004-02-23 23:02:54 +00:00
Родитель 8e085c81b9
Коммит 8369b8c5ac
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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;
};