Changeset 73929 in webkit


Ignore:
Timestamp:
Dec 13, 2010 10:27:11 AM (13 years ago)
Author:
andersca@apple.com
Message:

Crash when clicking a download link that targets a new tab
https://bugs.webkit.org/show_bug.cgi?id=50935
<rdar://problem/8760572>

Reviewed by John Sullivan.

Check for a null history item.

  • WebProcess/Downloads/mac/DownloadMac.mm:

(WebKit::originatingURLFromBackForwardList):

Location:
trunk/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit2/ChangeLog

    r73905 r73929  
     12010-12-13  Anders Carlsson  <andersca@apple.com>
     2
     3        Reviewed by John Sullivan.
     4
     5        Crash when clicking a download link that targets a new tab
     6        https://bugs.webkit.org/show_bug.cgi?id=50935
     7        <rdar://problem/8760572>
     8
     9        Check for a null history item.
     10
     11        * WebProcess/Downloads/mac/DownloadMac.mm:
     12        (WebKit::originatingURLFromBackForwardList):
     13
    1142010-12-13  Andras Becsi  <abecsi@webkit.org>
    215
  • trunk/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm

    r72841 r73929  
    6969        // FIXME: At one point we had code here to check a "was user gesture" flag.
    7070        // Do we need to restore that logic?
    71         originalURL = page->backForward()->itemAtIndex(-backIndex)->originalURL();
     71        HistoryItem *historyItem = page->backForward()->itemAtIndex(-backIndex);
     72        if (!historyItem)
     73            continue;
     74
     75        originalURL = historyItem->originalURL();
    7276        if (!originalURL.isNull())
    7377            return originalURL;
Note: See TracChangeset for help on using the changeset viewer.