Reviewed by Anders.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2006 07:39:32 +0000 (07:39 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Oct 2006 07:39:32 +0000 (07:39 +0000)
        - fix crash on back/forward - reattach WebDocumentLoadState to data source when needed

        * WebView/WebDataSource.m:
        (-[WebDataSource _setWebFrame:]):
        (-[WebDataSource _initWithDocumentLoadState:]):
        * WebView/WebDataSourceInternal.h:

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

WebKit/ChangeLog
WebKit/WebView/WebDataSource.m
WebKit/WebView/WebDataSourceInternal.h

index 7df523ef5b08881caa933e748885a3366893bddd..0e6e30b9fa51e6966796c54abcb4feefb82b5afd 100644 (file)
@@ -1,3 +1,14 @@
+2006-10-02  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Anders.
+        
+        - fix crash on back/forward - reattach WebDocumentLoadState to data source when needed
+
+        * WebView/WebDataSource.m:
+        (-[WebDataSource _setWebFrame:]):
+        (-[WebDataSource _initWithDocumentLoadState:]):
+        * WebView/WebDataSourceInternal.h:
+
 2006-10-02  Maciej Stachowiak  <mjs@apple.com>
 
         Build fix, not reviewed.
index 21f19a9da2e4715a34a022dea7726f2c9df6ba16..e7eec98cb3a3ed40a433b074cd87a691ef792131 100644 (file)
 #import <WebKit/DOMHTML.h>
 #import <WebKit/DOMPrivate.h>
 #import <WebKitSystemInterface.h>
-#import "WebDocumentLoadState.h"
+#import "WebDocumentLoadStateMac.h"
 
 @interface WebDataSourcePrivate : NSObject
 {
     @public
     
-    WebDocumentLoadState *loadState;
+    WebDocumentLoadStateMac *loadState;
     
     id <WebDocumentRepresentation> representation;
     
@@ -699,6 +699,8 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class class,
     _private->webFrame = frame;
 
     [_private->loadState setFrameLoader:[frame _frameLoader]];
+    if (frame)
+        [_private->loadState setDataSource:self];
     
     [self _defersCallbacksChanged];
     // no need to do _defersCallbacksChanged for subframes since they too
@@ -985,7 +987,7 @@ static inline void addTypesFromClass(NSMutableDictionary *allTypes, Class class,
     return _private->loadState;
 }
 
-- (id)_initWithDocumentLoadState:(WebDocumentLoadState *)loadState
+- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState
 {
     self = [super init];
     if (!self) {
index fa6c5ebe315b10d45ddae15cf27be10c904982ee..0c8e81ef30c07e4f76c49f64b4f3d881797027f5 100644 (file)
@@ -47,6 +47,7 @@
 @class WebUnarchivingState;
 @class WebView;
 @class WebDocumentLoadState;
+@class WebDocumentLoadStateMac;
 
 @protocol WebDocumentRepresentation;
 
 - (void)_setLoading:(BOOL)loading;
 - (void)_updateLoading;
 - (WebDocumentLoadState *)_documentLoadState;
-- (id)_initWithDocumentLoadState:(WebDocumentLoadState *)loadState;
+- (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState;
 @end