Changeset 25604 in webkit


Ignore:
Timestamp:
Sep 17, 2007 4:38:14 PM (17 years ago)
Author:
beidson
Message:

Reviewed by John Sullivan

Fix for http://bugs.webkit.org/show_bug.cgi?id=15178
and
<rdar://problem/5474001>

The stress test proves that this was an overzealous ASSERT. It is very possible to mark and icon
for addition to the on-disk database and then mark it for removal before it is ever added. This
is not an error and was already handled gracefully

  • loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::removeIconFromSQLDatabase): Don't ASSERT of log if the icon wasn't on disk
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r25603 r25604  
     12007-09-17  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by John Sullivan
     4
     5        Fix for http://bugs.webkit.org/show_bug.cgi?id=15178
     6        and
     7        <rdar://problem/5474001>
     8
     9        The stress test proves that this was an overzealous ASSERT.  It is very possible to mark and icon
     10        for addition to the on-disk database and then mark it for removal before it is ever added.  This
     11        is not an error and was already handled gracefully
     12
     13        * loader/icon/IconDatabase.cpp:
     14        (WebCore::IconDatabase::removeIconFromSQLDatabase): Don't ASSERT of log if the icon wasn't on disk
     15
    1162007-09-17  Brady Eidson  <beidson@apple.com>
    217
  • trunk/WebCore/loader/icon/IconDatabase.cpp

    r25568 r25604  
    19541954    // In practice the only caller of this method is always wrapped in a transaction itself so placing another here is unnecessary
    19551955   
     1956    // It's possible this icon is not in the database because of certain rapid browsing patterns (such as a stress test) where the
     1957    // icon is marked to be added then marked for removal before it is ever written to disk.  No big deal, early return
    19561958    int64_t iconID = getIconIDForIconURLFromSQLDatabase(iconURL);
    1957     ASSERT(iconID);
    1958     if (!iconID) {
    1959         LOG_ERROR("Unable to get iconID for icon URL %s to delete it from the database", urlForLogging(iconURL).utf8().data());
    1960         return;
    1961     }
     1959    if (!iconID)
     1960        return;
    19621961   
    19631962    readySQLStatement(m_deletePageURLsForIconURLStatement, m_syncDB, "DELETE FROM PageURL WHERE PageURL.iconID = (?);");
Note: See TracChangeset for help on using the changeset viewer.