+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>
Reviewed by Tim.
}
// Determines whether whitespace needs to be added around aString to preserve proper spacing and
-// punctuation when itÕs inserted into the receiverÕs 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
// 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
for (HashMap<String, CachedResource*>::const_iterator it = allResources.begin(); it != end; ++it) {
SharedBuffer* buffer = it->second->data();
NSData *data;
-
if (buffer)
data = buffer->createNSData();
else
- data = nil;
-
- // 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.
+ data = [[NSData alloc] init];
[d addObject:data];
[data release];
[r addObject:it->second->response().nsURLResponse()];