Changeset 93606 in webkit


Ignore:
Timestamp:
Aug 23, 2011 8:48:55 AM (13 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Treat the case of WebCore::History->currentItem() returning NULL.
https://bugs.webkit.org/show_bug.cgi?id=66698

Patch by Raphael Kubo da Costa <kubo@profusion.mobi> on 2011-08-23
Reviewed by Kenneth Rohde Christiansen.

WebCore::History->currentItem() may return NULL, and we'd better treat
it in ewk_history_history_item_current_get itself than propagate the
issue to _ewk_history_item_new.

  • ewk/ewk_history.cpp:

(ewk_history_history_item_current_get):

  • ewk/ewk_history.h:
Location:
trunk/Source/WebKit/efl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/efl/ChangeLog

    r93602 r93606  
     12011-08-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
     2
     3        [EFL] Treat the case of WebCore::History->currentItem() returning NULL.
     4        https://bugs.webkit.org/show_bug.cgi?id=66698
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        WebCore::History->currentItem() may return NULL, and we'd better treat
     9        it in ewk_history_history_item_current_get itself than propagate the
     10        issue to _ewk_history_item_new.
     11
     12        * ewk/ewk_history.cpp:
     13        (ewk_history_history_item_current_get):
     14        * ewk/ewk_history.h:
     15
    1162011-08-23  Raphael Kubo da Costa  <kubo@profusion.mobi>
    217
  • trunk/Source/WebKit/efl/ewk/ewk_history.cpp

    r93602 r93606  
    154154{
    155155    EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0);
    156     return _ewk_history_item_new(core->currentItem());
     156    WebCore::HistoryItem *currentItem = core->currentItem();
     157    if (currentItem)
     158        return _ewk_history_item_new(currentItem);
     159    return 0;
    157160}
    158161
  • trunk/Source/WebKit/efl/ewk/ewk_history.h

    r92473 r93606  
    111111 * @param history which history instance to query.
    112112 *
    113  * @return the @b newly allocated item instance. This memory must be
    114  *         released with ewk_history_item_free() after use.
     113 * @return the @b newly allocated item instance or @c NULL on error. This memory
     114 *         must be released with ewk_history_item_free() after use.
    115115 */
    116116EAPI Ewk_History_Item *ewk_history_history_item_current_get(const Ewk_History *history);
Note: See TracChangeset for help on using the changeset viewer.