Not reviewed, fix for crash on launch bug in last patch.
[WebKit-https.git] / WebKit / WebView / WebHTMLView.mm
index a699668d454070f72bc990450a4c1cb4b6c4c38d..066c1497a1880dc1735250727c1283fe953bb529 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];
     }