Reviewed by Eric.
- test for <rdar://problem/
4683948> REGRESSION: Assertion failure in [FrameProgressEntry addChild:forDataSource:] (fandango.com)
(I both added a WebKit assertion that would fail under this test, and then did a fix to make it not fire)
* fast/loader/start-load-in-unload-expected.txt: Added.
* fast/loader/start-load-in-unload.html: Added.
WebKit:
Reviewed by Eric.
<rdar://problem/
4683948> REGRESSION: Assertion failure in [FrameProgressEntry addChild:forDataSource:] (fandango.com)
* Loader/WebFrameLoader.m:
(-[WebFrameLoader addSubresourceLoader:]): Add a WebKit-level assertion that should fire when this bad
situation occurs.
* Loader/WebSubresourceLoader.m:
(+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]): Prevent
the situation from occuring.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@15982
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2006-08-22 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ - test for <rdar://problem/4683948> REGRESSION: Assertion failure in [FrameProgressEntry addChild:forDataSource:] (fandango.com)
+
+ (I both added a WebKit assertion that would fail under this test, and then did a fix to make it not fire)
+
+ * fast/loader/start-load-in-unload-expected.txt: Added.
+ * fast/loader/start-load-in-unload.html: Added.
+
2006-08-22 Maciej Stachowiak <mjs@apple.com>
Fix for broken tests.
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView 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
+ RenderImage {IMG} at (0,0) size 20x20
+ RenderText {#text} at (20,6) size 732x18
+ text run at (20,6) width 732: " This test verifies that starting a subresource load from an unload handler does not cause crashes or assertion failures."
+ RenderText {#text} at (0,0) size 0x0
--- /dev/null
+
+<body onunload="document.getElementById('i').src = 'broken.jpg'">
+<img id="i" src="nosrc.jpg">
+This test verifies that starting a subresource load from an unload handler does not cause crashes or assertion failures.
+</body>
+2006-08-22 Maciej Stachowiak <mjs@apple.com>
+
+ Reviewed by Eric.
+
+ <rdar://problem/4683948> REGRESSION: Assertion failure in [FrameProgressEntry addChild:forDataSource:] (fandango.com)
+
+ * Loader/WebFrameLoader.m:
+ (-[WebFrameLoader addSubresourceLoader:]): Add a WebKit-level assertion that should fire when this bad
+ situation occurs.
+ * Loader/WebSubresourceLoader.m:
+ (+[WebSubresourceLoader startLoadingResource:withRequest:customHeaders:referrer:forFrameLoader:]): Prevent
+ the situation from occuring.
+
2006-08-22 Maciej Stachowiak <mjs@apple.com>
Reviewed by Anders.
- (void)addSubresourceLoader:(WebLoader *)loader
{
+ ASSERT(!provisionalDataSource);
if (subresourceLoaders == nil)
subresourceLoaders = [[NSMutableArray alloc] init];
[subresourceLoaders addObject:loader];
referrer:(NSString *)referrer
forFrameLoader:(WebFrameLoader *)fl
{
+ if ([fl state] == WebFrameStateProvisional)
+ return nil;
+
WebSubresourceLoader *loader = [[[self alloc] initWithLoader:rLoader frameLoader:fl] autorelease];
[fl addSubresourceLoader:loader];