Commit 8af3894b authored by timothy@apple.com's avatar timothy@apple.com

Reviewed by John.

        <rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]

        * page/mac/WebCoreFrameBridge.mm:
        (-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
        If the SharedBuffer is null insert an empty NSData instead of nil.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27731 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7f984871
2007-11-12 Timothy Hatcher <timothy@apple.com>
Reviewed by John.
<rdar://problem/5268311> REGRESSION (Safari 2-3): Exception thrown when calling -[WebDataSource subresources]
* page/mac/WebCoreFrameBridge.mm:
(-[WebCoreFrameBridge getAllResourceDatas:andResponses:]):
If the SharedBuffer is null insert an empty NSData instead of nil.
2007-11-12 Darin Adler <darin@apple.com> 2007-11-12 Darin Adler <darin@apple.com>
Reviewed by Tim. Reviewed by Tim.
......
...@@ -975,7 +975,7 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element) ...@@ -975,7 +975,7 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
} }
// Determines whether whitespace needs to be added around aString to preserve proper spacing and // Determines whether whitespace needs to be added around aString to preserve proper spacing and
// punctuation when its inserted into the receivers text over charRange. Returns by reference // punctuation when it’s inserted into the receiver’s text over charRange. Returns by reference
// in beforeString and afterString any whitespace that should be added, unless either or both are // in beforeString and afterString any whitespace that should be added, unless either or both are
// nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled. // nil. Both are returned as nil if aString is nil or if smart insertion and deletion are disabled.
- (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString - (void)smartInsertForString:(NSString *)pasteString replacingRange:(DOMRange *)rangeToReplace beforeString:(NSString **)beforeString afterString:(NSString **)afterString
...@@ -1266,15 +1266,10 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element) ...@@ -1266,15 +1266,10 @@ static HTMLFormElement *formElementFromDOMElement(DOMElement *element)
for (HashMap<String, CachedResource*>::const_iterator it = allResources.begin(); it != end; ++it) { for (HashMap<String, CachedResource*>::const_iterator it = allResources.begin(); it != end; ++it) {
SharedBuffer* buffer = it->second->data(); SharedBuffer* buffer = it->second->data();
NSData *data; NSData *data;
if (buffer) if (buffer)
data = buffer->createNSData(); data = buffer->createNSData();
else else
data = nil; data = [[NSData alloc] init];
// It's clearly a bug to pass a nil value for data here, and doing so is part of the problem in
// <rdar://problem/5268311>. However, fixing this in the obvious ways makes the symptom in 5268311
// worse, so don't just fix this without investigating that bug further.
[d addObject:data]; [d addObject:data];
[data release]; [data release];
[r addObject:it->second->response().nsURLResponse()]; [r addObject:it->second->response().nsURLResponse()];
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment