From df6c7e475d73d6194330480ae044fdd054590ae5 Mon Sep 17 00:00:00 2001 From: stippi Date: Sat, 27 Feb 2010 18:26:46 +0000 Subject: [PATCH] The BWebDownload was using BWebPage for stuff, but the BWebPage can be long gone when a BWebDownload wanted to use it. Now the class is more self-sufficient. One example of the problem was clicking a link that opens a blank page, then closing that page while the download was still loading. 1) The download finished notification never arrived and 2) clicking to cancel the download would crash after the download finished, since really it had already selfdestructed... git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@240 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/DownloadWindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/apps/webpositive/DownloadWindow.cpp b/src/apps/webpositive/DownloadWindow.cpp index fbbe932118..44e5fa936e 100644 --- a/src/apps/webpositive/DownloadWindow.cpp +++ b/src/apps/webpositive/DownloadWindow.cpp @@ -272,6 +272,12 @@ public: // TOAST! return; } + case B_DOWNLOAD_REMOVED: + // TODO: This is a bit asymetric. The removed notification + // arrives here, but it would be nicer if it arrived + // at the window... + Window()->PostMessage(message); + break; default: BGridView::MessageReceived(message); }