Bug 94308

Summary: [EFL][WK2] Getting unnecessary EINA_SAFETY_ON_NULL_RETURN_VAL warnings while page navigation
Product: WebKit Reporter: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Component: WebKit EFLAssignee: Mikhail Pozdnyakov <mikhail.pozdnyakov>
Status: RESOLVED FIXED    
Severity: Normal CC: gyuyoung.kim, kenneth, lucas.de.marchi, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
kenneth: review+, kenneth: commit-queue-
to be landed none

Description Mikhail Pozdnyakov 2012-08-17 01:01:53 PDT
Getting following message while back-forward page navigation:

ERR<17498>: /media/ssd/WebKit/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp:76 addItemToWrapperCache() safety check failed: wkItem == NULL

The reason is that loadClient.didChangeBackForwardList callback is invoked with zero arguments which is valid case
while page back-forward navigation and means basically that the back-froward list has changed but items were not added or deleted.
Comment 1 Mikhail Pozdnyakov 2012-08-17 01:05:15 PDT
Created attachment 159035 [details]
patch
Comment 2 Chris Dumez 2012-08-17 01:14:07 PDT
Comment on attachment 159035 [details]
patch

LGTM.
Comment 3 Kenneth Rohde Christiansen 2012-08-17 01:23:56 PDT
Comment on attachment 159035 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=159035&action=review

> Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp:132
> -    addItemToWrapperCache(list, wkAddedItem); // Puts new item to the cache.
> +    if (wkAddedItem)
> +        addItemToWrapperCache(list, wkAddedItem); // Puts new item to the cache.

A comment in the code makes sense
Comment 4 Mikhail Pozdnyakov 2012-08-17 01:31:47 PDT
Created attachment 159045 [details]
to be landed
Comment 5 WebKit Review Bot 2012-08-17 02:25:28 PDT
Comment on attachment 159045 [details]
to be landed

Clearing flags on attachment: 159045

Committed r125872: <http://trac.webkit.org/changeset/125872>
Comment 6 WebKit Review Bot 2012-08-17 02:25:33 PDT
All reviewed patches have been landed.  Closing bug.