Bug 114356

Summary: REGRESSION(r148034): IconDatabase::updatIconRecord crashes with null iconData and iconBitmap.
Product: WebKit Reporter: Raphael Kubo da Costa (:rakuco) <rakuco>
Component: WebCore Misc.Assignee: Raphael Kubo da Costa (:rakuco) <rakuco>
Status: RESOLVED FIXED    
Severity: Normal CC: oliver, simon.fraser, spenap, thorton
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch thorton: review+

Raphael Kubo da Costa (:rakuco)
Reported 2013-04-10 06:53:59 PDT
REGRESSION(r148034): IconDatabase::updatIconRecord crashes with null iconData and iconBitmap.
Attachments
Patch (2.04 KB, patch)
2013-04-10 06:57 PDT, Raphael Kubo da Costa (:rakuco)
thorton: review+
Raphael Kubo da Costa (:rakuco)
Comment 1 2013-04-10 06:57:37 PDT
Tim Horton
Comment 2 2013-04-10 08:45:53 PDT
Comment on attachment 197262 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197262&action=review > Source/WebCore/loader/icon/IconDatabase.cpp:541 > + ASSERT(!(!!iconData && !!iconBitmap)); !! is a bit bizarre but there are other instances of it around. But I wonder why && alone isn't enough?
Raphael Kubo da Costa (:rakuco)
Comment 3 2013-04-10 09:05:55 PDT
(In reply to comment #2) > (From update of attachment 197262 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=197262&action=review > > > Source/WebCore/loader/icon/IconDatabase.cpp:541 > > + ASSERT(!(!!iconData && !!iconBitmap)); > > !! is a bit bizarre but there are other instances of it around. But I wonder why && alone isn't enough? I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I'm adding an extra ! to get the "original" boolean value.
Raphael Kubo da Costa (:rakuco)
Comment 4 2013-04-10 09:12:21 PDT
Darin Adler
Comment 5 2013-04-10 09:42:32 PDT
Comment on attachment 197262 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=197262&action=review >>> Source/WebCore/loader/icon/IconDatabase.cpp:541 >>> + ASSERT(!(!!iconData && !!iconBitmap)); >> >> !! is a bit bizarre but there are other instances of it around. But I wonder why && alone isn't enough? > > I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I'm adding an extra ! to get the "original" boolean value. No, those !! are not needed unless there is a bug in PassRefPtr. The && operator should work fine with two PassRefPtr values without requiring the ! at all. It would be nice to remove those.
Raphael Kubo da Costa (:rakuco)
Comment 6 2013-04-11 02:16:28 PDT
(In reply to comment #5) > (From update of attachment 197262 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=197262&action=review > > >>> Source/WebCore/loader/icon/IconDatabase.cpp:541 > >>> + ASSERT(!(!!iconData && !!iconBitmap)); > >> > >> !! is a bit bizarre but there are other instances of it around. But I wonder why && alone isn't enough? > > > > I was just being extra-cautious here; PassRefPtr::operator!() was casting them into bools, and I'm adding an extra ! to get the "original" boolean value. > > No, those !! are not needed unless there is a bug in PassRefPtr. The && operator should work fine with two PassRefPtr values without requiring the ! at all. > > It would be nice to remove those. https://bugs.webkit.org/show_bug.cgi?id=114425
Note You need to log in before you can comment on or make changes to this bug.