Changeset 64942 in webkit


Ignore:
Timestamp:
Aug 7, 2010 11:58:14 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-08-07 Adam Barth <abarth@webkit.org>

Reviewed by Sam Weinig.

Empty strings can have more than one ref
https://bugs.webkit.org/show_bug.cgi?id=43666

These asserts are trying to say that we have a thread-safe copy of the
string, but they're not accurate for empty strings because we use a
special static empty string that magically has infinite refs.

  • storage/OriginUsageRecord.cpp: (WebCore::OriginUsageRecord::addDatabase): (WebCore::OriginUsageRecord::markDatabase):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r64941 r64942  
     12010-08-07  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Sam Weinig.
     4
     5        Empty strings can have more than one ref
     6        https://bugs.webkit.org/show_bug.cgi?id=43666
     7
     8        These asserts are trying to say that we have a thread-safe copy of the
     9        string, but they're not accurate for empty strings because we use a
     10        special static empty string that magically has infinite refs.
     11
     12        * storage/OriginUsageRecord.cpp:
     13        (WebCore::OriginUsageRecord::addDatabase):
     14        (WebCore::OriginUsageRecord::markDatabase):
     15
    1162010-08-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
    217        Reviewed by Eric Seidel.
  • trunk/WebCore/storage/OriginUsageRecord.cpp

    r54736 r64942  
    4343{
    4444    ASSERT(!m_databaseMap.contains(identifier));
    45     ASSERT_ARG(identifier, identifier.impl()->hasOneRef());
    46     ASSERT_ARG(fullPath, fullPath.impl()->hasOneRef());
     45    ASSERT_ARG(identifier, identifier.impl()->hasOneRef() || identifier.isEmpty());
     46    ASSERT_ARG(fullPath, fullPath.impl()->hasOneRef() || fullPath.isEmpty());
    4747
    4848    m_databaseMap.set(identifier, DatabaseEntry(fullPath));
     
    6464{
    6565    ASSERT(m_databaseMap.contains(identifier));
    66     ASSERT_ARG(identifier, identifier.impl()->hasOneRef());
     66    ASSERT_ARG(identifier, identifier.impl()->hasOneRef() || identifier.isEmpty());
    6767
    6868    m_unknownSet.add(identifier);
Note: See TracChangeset for help on using the changeset viewer.