[WK2] [GTK] TestDownloads hitting an assertion in Debug builds
authorsergio@webkit.org <sergio@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 18:03:06 +0000 (18:03 +0000)
committersergio@webkit.org <sergio@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 24 Jan 2012 18:03:06 +0000 (18:03 +0000)
https://bugs.webkit.org/show_bug.cgi?id=76915

Reviewed by Martin Robinson.

No new tests required as it fixes some assertions in a unit test.

* WebProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):

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

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp

index 2d05214..8ebfa6e 100644 (file)
@@ -1,3 +1,16 @@
+2012-01-24  Sergio Villar Senin  <svillar@igalia.com>
+
+        [WK2] [GTK] TestDownloads hitting an assertion in Debug builds
+        https://bugs.webkit.org/show_bug.cgi?id=76915
+
+        Reviewed by Martin Robinson.
+
+        No new tests required as it fixes some assertions in a unit test.
+
+        * WebProcess/Downloads/soup/DownloadSoup.cpp:
+        (WebKit::Download::start):
+        (WebKit::Download::startWithHandle):
+
 2012-01-24  No'am Rosenthal  <noam.rosenthal@nokia.com>
 
         [Qt][WK2] Qt's cross-process AC copies images excessively when updating tiles.
index e43f7a4..2d96fee 100644 (file)
@@ -132,8 +132,8 @@ public:
 
 void Download::start(WebPage* initiatingWebPage)
 {
-    ASSERT(m_downloadClient);
-    ASSERT(m_resourceHandle);
+    ASSERT(!m_downloadClient);
+    ASSERT(!m_resourceHandle);
     m_downloadClient = adoptPtr(new DownloadClient(this));
     m_resourceHandle = ResourceHandle::create(0, m_request, m_downloadClient.get(), false, false);
     didStart();
@@ -141,8 +141,8 @@ void Download::start(WebPage* initiatingWebPage)
 
 void Download::startWithHandle(WebPage* initiatingPage, ResourceHandle* resourceHandle, const ResourceResponse&)
 {
-    ASSERT(m_downloadClient);
-    ASSERT(m_resourceHandle);
+    ASSERT(!m_downloadClient);
+    ASSERT(!m_resourceHandle);
     m_downloadClient = adoptPtr(new DownloadClient(this));
     resourceHandle->setClient(m_downloadClient.get());
     m_resourceHandle = resourceHandle;