Not reviewed, fix for crash on launch bug in last patch.
authormjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Aug 2007 07:11:35 +0000 (07:11 +0000)
committermjs <mjs@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 20 Aug 2007 07:11:35 +0000 (07:11 +0000)
        * WebView/WebHTMLView.mm:
        (-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
        face of that condition.

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

WebKit/ChangeLog
WebKit/WebView/WebHTMLView.mm

index c84937e..7c52006 100644 (file)
@@ -1,3 +1,11 @@
+2007-08-20  Maciej Stachowiak  <mjs@apple.com>
+
+        Not reviewed, fix for crash on launch bug in last patch.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView setDataSource:]): Remove an assertion, fix code to work right in the
+        face of that condition.
+
 2007-08-18  Maciej Stachowiak  <mjs@apple.com>
 
         Reviewed by Darin.
index a699668..066c149 100644 (file)
@@ -3251,9 +3251,10 @@ noPromisedData:
 {
     ASSERT(dataSource);
     if (_private->dataSource != dataSource) {
-        ASSERT(!_private->dataSource);
         ASSERT(!_private->closed);
-        _private->dataSource = [dataSource retain];
+        [dataSource retain];
+        [_private->dataSource release];
+        _private->dataSource = dataSource;
         [_private->pluginController setDataSource:dataSource];
         [self addMouseMovedObserver];
     }