mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
3aef47de94
commit
8a69fac021
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>
|
2003-03-25 David Ayers <d.ayers@inode.at>
|
||||||
|
|
||||||
* Headers/gnustep/base/GSObjCRuntime.h
|
* Headers/gnustep/base/GSObjCRuntime.h
|
||||||
|
|
|
@ -1514,14 +1514,23 @@ static void unescape(const char *from, char * to)
|
||||||
- (void) URLHandle: (NSURLHandle*)sender
|
- (void) URLHandle: (NSURLHandle*)sender
|
||||||
resourceDataDidBecomeAvailable: (NSData*)newData
|
resourceDataDidBecomeAvailable: (NSData*)newData
|
||||||
{
|
{
|
||||||
[clientForHandle(_clients, sender) URL: self
|
id c = clientForHandle(_clients, sender);
|
||||||
resourceDataDidBecomeAvailable: newData];
|
|
||||||
|
if ([c respondsToSelector: @selector(URL:resourceDataDidBecomeAvailable:)])
|
||||||
|
{
|
||||||
|
[c URL: self resourceDataDidBecomeAvailable: newData];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) URLHandle: (NSURLHandle*)sender
|
- (void) URLHandle: (NSURLHandle*)sender
|
||||||
resourceDidFailLoadingWithReason: (NSString*)reason
|
resourceDidFailLoadingWithReason: (NSString*)reason
|
||||||
{
|
{
|
||||||
[clientForHandle(_clients, sender) URL: self
|
id c = clientForHandle(_clients, sender);
|
||||||
resourceDidFailLoadingWithReason: reason];
|
|
||||||
|
if ([c respondsToSelector: @selector(URL:resourceDidFailLoadingWithReason:)])
|
||||||
|
{
|
||||||
|
[c URL: self resourceDidFailLoadingWithReason: reason];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) URLHandleResourceDidBeginLoading: (NSURLHandle*)sender
|
- (void) URLHandleResourceDidBeginLoading: (NSURLHandle*)sender
|
||||||
|
@ -1530,12 +1539,22 @@ static void unescape(const char *from, char * to)
|
||||||
|
|
||||||
- (void) URLHandleResourceDidCancelLoading: (NSURLHandle*)sender
|
- (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
|
- (void) URLHandleResourceDidFinishLoading: (NSURLHandle*)sender
|
||||||
{
|
{
|
||||||
[clientForHandle(_clients, sender) URLResourceDidFinishLoading: self];
|
id c = clientForHandle(_clients, sender);
|
||||||
|
|
||||||
|
if ([c respondsToSelector: @selector(URLResourceDidFinishLoading:g:)])
|
||||||
|
{
|
||||||
|
[c URLResourceDidFinishLoading: self];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue