Skip to content
Permalink
Browse files
[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:

Canonical link: https://commits.webkit.org/82583@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@93606 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Raphael Kubo da Costa authored and webkit-commit-queue committed Aug 23, 2011
1 parent fc67e6e commit 5a57313a91511c431566054b9889983e65574240
Showing 3 changed files with 21 additions and 3 deletions.
@@ -1,3 +1,18 @@
2011-08-23 Raphael Kubo da Costa <kubo@profusion.mobi>

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

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:

2011-08-23 Raphael Kubo da Costa <kubo@profusion.mobi>

[EFL] Add auxiliary history functions for DRT
@@ -153,7 +153,10 @@ Ewk_History_Item* ewk_history_history_item_back_get(const Ewk_History* history)
Ewk_History_Item* ewk_history_history_item_current_get(const Ewk_History* history)
{
EWK_HISTORY_CORE_GET_OR_RETURN(history, core, 0);
return _ewk_history_item_new(core->currentItem());
WebCore::HistoryItem *currentItem = core->currentItem();
if (currentItem)
return _ewk_history_item_new(currentItem);
return 0;
}

Ewk_History_Item* ewk_history_history_item_forward_get(const Ewk_History* history)
@@ -110,8 +110,8 @@ EAPI Ewk_History_Item *ewk_history_history_item_back_get(const Ewk_History *hist
*
* @param history which history instance to query.
*
* @return the @b newly allocated item instance. This memory must be
* released with ewk_history_item_free() after use.
* @return the @b newly allocated item instance or @c NULL on error. This memory
* must be released with ewk_history_item_free() after use.
*/
EAPI Ewk_History_Item *ewk_history_history_item_current_get(const Ewk_History *history);

0 comments on commit 5a57313

Please sign in to comment.