[webkit-changes] cvs commit: WebKit/WebView.subproj WebDataSource.m
Beth
bdakin at opensource.apple.com
Fri Oct 21 17:11:20 PDT 2005
bdakin 05/10/21 17:11:19
Modified: . ChangeLog
WebView.subproj WebDataSource.m
Added: fast/events onloadFrameCrash-expected.checksum
onloadFrameCrash-expected.png
onloadFrameCrash-expected.txt onloadFrameCrash.html
Log:
Revision Changes Path
1.1 LayoutTests/fast/events/onloadFrameCrash-expected.checksum
Index: onloadFrameCrash-expected.checksum
===================================================================
cbc367633746909085889bdfe6ac90ce
1.1 LayoutTests/fast/events/onloadFrameCrash-expected.png
<<Binary file>>
1.1 LayoutTests/fast/events/onloadFrameCrash-expected.txt
Index: onloadFrameCrash-expected.txt
===================================================================
layer at (0,0) size 800x600
RenderCanvas at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
RenderPartObject {IFRAME} at (0,0) size 300x150
RenderText {TEXT} at (300,136) size 92x18
text run at (300,136) width 92: "This is the text"
1.1 LayoutTests/fast/events/onloadFrameCrash.html
Index: onloadFrameCrash.html
===================================================================
<body onload="document.body.style.display = 'none'"><iframe src="_self"></iframe>This is the text</body>
1.3357 +13 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3356
retrieving revision 1.3357
diff -u -r1.3356 -r1.3357
--- ChangeLog 21 Oct 2005 18:42:58 -0000 1.3356
+++ ChangeLog 22 Oct 2005 00:11:16 -0000 1.3357
@@ -1,3 +1,16 @@
+2005-10-21 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Darin??
+
+ Fix for <rdar://problem/3853672> Malformed HTML using crashes Safari in NSFireTimer
+
+ The webFrame was being deleted prematurely by a call to stop(), so we changed it
+ so that the calls to _receivedMainResourceError and _mainReceivedError happen
+ before the stop(), and we retain the bridge.
+
+ * WebView.subproj/WebDataSource.m:
+ (-[WebDataSource _receivedMainResourceError:complete:]):
+
2005-10-21 Geoffrey Garen <ggaren at apple.com>
Patch by TimO, Reviewed by hyatt, tested and landed by me.
1.213 +15 -6 WebKit/WebView.subproj/WebDataSource.m
Index: WebDataSource.m
===================================================================
RCS file: /cvs/root/WebKit/WebView.subproj/WebDataSource.m,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -r1.212 -r1.213
--- WebDataSource.m 20 Sep 2005 08:33:04 -0000 1.212
+++ WebDataSource.m 22 Oct 2005 00:11:19 -0000 1.213
@@ -784,18 +784,27 @@
- (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete
{
+ WebBridge *bridge = [[self webFrame] _bridge];
+
+ // Retain the bridge because the stop may release the last reference to it.
+ [bridge retain];
+
+ [[self webFrame] _receivedMainResourceError:error];
+ [[self _webView] _mainReceivedError:error
+ fromDataSource:self
+ complete:isComplete];
+
if (isComplete) {
+ // FIXME: Don't want to do this if an entirely new load is going, so should check
+ // that both data sources on the frame are either self or nil.
// Can't call [self _bridge] because we might not have commited yet
- [[[self webFrame] _bridge] stop];
+ [bridge stop];
// FIXME: WebKitErrorPlugInWillHandleLoad is a workaround for the cancel we do to prevent loading plugin content twice. See <rdar://problem/4258008>
if ([error code] != NSURLErrorCancelled && [error code] != WebKitErrorPlugInWillHandleLoad)
- [[[self webFrame] _bridge] handleFallbackContent];
+ [bridge handleFallbackContent];
}
- [[self webFrame] _receivedMainResourceError:error];
- [[self _webView] _mainReceivedError:error
- fromDataSource:self
- complete:isComplete];
+ [bridge release];
}
- (void)_updateIconDatabaseWithURL:(NSURL *)iconURL
More information about the webkit-changes
mailing list