Minor safety checks.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@16255 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
CaS 2003-03-25 10:03:43 +00:00
parent 3aef47de94
commit 8a69fac021
2 changed files with 31 additions and 6 deletions

View file

@ -1514,14 +1514,23 @@ static void unescape(const char *from, char * to)
- (void) URLHandle: (NSURLHandle*)sender
resourceDataDidBecomeAvailable: (NSData*)newData
{
[clientForHandle(_clients, sender) URL: self
resourceDataDidBecomeAvailable: newData];
id c = clientForHandle(_clients, sender);
if ([c respondsToSelector: @selector(URL:resourceDataDidBecomeAvailable:)])
{
[c URL: self resourceDataDidBecomeAvailable: newData];
}
}
- (void) URLHandle: (NSURLHandle*)sender
resourceDidFailLoadingWithReason: (NSString*)reason
{
[clientForHandle(_clients, sender) URL: self
resourceDidFailLoadingWithReason: reason];
id c = clientForHandle(_clients, sender);
if ([c respondsToSelector: @selector(URL:resourceDidFailLoadingWithReason:)])
{
[c URL: self resourceDidFailLoadingWithReason: reason];
}
}
- (void) URLHandleResourceDidBeginLoading: (NSURLHandle*)sender
@ -1530,12 +1539,22 @@ static void unescape(const char *from, char * to)
- (void) URLHandleResourceDidCancelLoading: (NSURLHandle*)sender
{
[clientForHandle(_clients, sender) URLResourceDidCancelLoading: self];
id c = clientForHandle(_clients, sender);
if ([c respondsToSelector: @selector(URLResourceDidCancelLoading:)])
{
[c URLResourceDidCancelLoading: self];
}
}
- (void) URLHandleResourceDidFinishLoading: (NSURLHandle*)sender
{
[clientForHandle(_clients, sender) URLResourceDidFinishLoading: self];
id c = clientForHandle(_clients, sender);
if ([c respondsToSelector: @selector(URLResourceDidFinishLoading:g:)])
{
[c URLResourceDidFinishLoading: self];
}
}