mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
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:
parent
4de07c1156
commit
eb88d30c7c
2 changed files with 31 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2003-03-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSURL.m: When loading a resource and attempting to notify
|
||||
a client, check that the client responds to the selectors before
|
||||
sending messages to it.
|
||||
|
||||
2003-03-25 David Ayers <d.ayers@inode.at>
|
||||
|
||||
* Headers/gnustep/base/GSObjCRuntime.h
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue