Changeset 148097 in webkit


Ignore:
Timestamp:
Apr 10, 2013 9:13:35 AM (11 years ago)
Author:
rakuco@webkit.org
Message:

REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
https://bugs.webkit.org/show_bug.cgi?id=114356

Reviewed by Tim Horton.

When loading an icon fails (for example, when a non-existent URI is
passed to the loader), updateIconRecord can be called with both
iconData and iconBitmap having no data.

This used to be fine before r148034, but causes an assertion now.

No new tests, existing tests such as fast/encoding/mispositioned-meta.html
were crashing.

  • loader/icon/IconDatabase.cpp:

(WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
for a NAND condition that only fails if both iconData and iconBitmap
are not 0.

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148094 r148097  
     12013-04-10  Raphael Kubo da Costa  <raphael.kubo.da.costa@intel.com>
     2
     3        REGRESSION(r148034): IconDatabase::updateIconRecord crashes with null iconData and iconBitmap.
     4        https://bugs.webkit.org/show_bug.cgi?id=114356
     5
     6        Reviewed by Tim Horton.
     7
     8        When loading an icon fails (for example, when a non-existent URI is
     9        passed to the loader), updateIconRecord can be called with both
     10        iconData and iconBitmap having no data.
     11
     12        This used to be fine before r148034, but causes an assertion now.
     13
     14        No new tests, existing tests such as fast/encoding/mispositioned-meta.html
     15        were crashing.
     16
     17        * loader/icon/IconDatabase.cpp:
     18        (WebCore::IconDatabase::updateIconRecord): Change the ASSERT() to check
     19        for a NAND condition that only fails if both iconData and iconBitmap
     20        are not 0.
     21
    1222013-04-10  JungJik Lee  <jungjik.lee@samsung.com>
    223
  • trunk/Source/WebCore/loader/icon/IconDatabase.cpp

    r148052 r148097  
    538538void IconDatabase::updateIconRecord(PassRefPtr<SharedBuffer> iconData, PassRefPtr<Image> iconBitmap, const String& iconURL)
    539539{
    540     // Only one of iconData or iconBitmap should be provided, never both.
    541     ASSERT(!iconData != !iconBitmap);
     540    // Only one of iconData or iconBitmap should be provided, never both. None is also fine.
     541    ASSERT(!(!!iconData && !!iconBitmap));
    542542
    543543    Vector<String> pageURLs;
Note: See TracChangeset for help on using the changeset viewer.