Bug 163555

Summary: CTTE some of the BackForwardList member functions
Product: WebKit Reporter: Anders Carlsson <andersca>
Component: New BugsAssignee: Anders Carlsson <andersca>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch mitz: review+

Description Anders Carlsson 2016-10-17 11:30:34 PDT
CTTE some of the BackForwardList member functions
Comment 1 Anders Carlsson 2016-10-17 11:32:06 PDT
Created attachment 291842 [details]
Patch
Comment 2 Darin Adler 2016-10-17 11:36:30 PDT
Comment on attachment 291842 [details]
Patch

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

> Source/WebKit/mac/History/WebBackForwardList.mm:208
> -    return core(self)->containsItem(core(item));
> +    if (!item)
> +        return NO;
> +
> +    return core(self)->containsItem(*core(item));

I like to write it like this:

    return item && return core(self)->containsItem(*core(item));
Comment 3 Anders Carlsson 2016-10-17 11:38:05 PDT
Committed r207419: <http://trac.webkit.org/changeset/207419>
Comment 4 Chris Dumez 2016-10-17 12:16:18 PDT
I get a build error on iOS:
/Volumes/Data/cdumez/WebKit/OpenSource/Source/WebKit/mac/History/WebBackForwardList.mm:170:34: error: no matching function for call to 'kit'
        [entriesArray addObject:[kit(historyItems[i].ptr()) dictionaryRepresentationIncludingChildren:NO]];