Reviewed by Adam.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2007 08:56:18 +0000 (08:56 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 1 Feb 2007 08:56:18 +0000 (08:56 +0000)
        <rdar://problem/4730469> REGRESSION: Assertion failure in -[WebDataSource(WebInternal) _bridge] when forwarding message

        * WebView/WebDataSource.mm:
        (-[WebDataSource subresources]): Check for being uncommitted and return emtpy result.
        (-[WebDataSource subresourceForURL:]): ditto

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@19337 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/ChangeLog
WebKit/WebView/WebDataSource.mm

index 28077fd5e7e6a5944ae10c498d010734ca6ecfdf..7c315958ededd49a1d743d187c0f72ddb07deae8 100644 (file)
@@ -1,3 +1,13 @@
+2007-02-01  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Adam.
+        
+        <rdar://problem/4730469> REGRESSION: Assertion failure in -[WebDataSource(WebInternal) _bridge] when forwarding message
+
+        * WebView/WebDataSource.mm:
+        (-[WebDataSource subresources]): Check for being uncommitted and return emtpy result.
+        (-[WebDataSource subresourceForURL:]): ditto
+
 2007-01-31  Oliver Hunt  <oliver@apple.com>
 
         Reviewed by Adam.     
index b8add176e8e3f8ae7f8332a3c72af0acbcdb63cb..96cb623e394941c392f70d666c7cf3ea5e8945f5 100644 (file)
@@ -459,6 +459,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 
 - (NSArray *)subresources
 {
+    if (!_private->loader->isCommitted())
+        return [NSMutableArray array];
+
     NSArray *datas;
     NSArray *responses;
     [[self _bridge] getAllResourceDatas:&datas andResponses:&responses];
@@ -475,6 +478,9 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class objCCl
 
 - (WebResource *)subresourceForURL:(NSURL *)URL
 {
+    if (!_private->loader->isCommitted())
+        return nil;
+
     NSData *data;
     NSURLResponse *response;
     if (![[self _bridge] getData:&data andResponse:&response forURL:URL])