Changeset 43937 in webkit


Ignore:
Timestamp:
May 20, 2009 3:35:10 PM (15 years ago)
Author:
beidson@apple.com
Message:

2009-05-20 Brady Eidson <beidson@apple.com>

Reviewed by Darin Adler.

<rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk

  • History/WebHistory.mm: (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil.
Location:
trunk/WebKit/mac
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/mac/ChangeLog

    r43931 r43937  
     12009-05-20  Brady Eidson  <beidson@apple.com>
     2
     3        Reviewed by Darin Adler.
     4
     5        <rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk
     6
     7        * History/WebHistory.mm:
     8        (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil.
     9
    1102009-05-20  Anders Carlsson  <andersca@apple.com>
    211
  • trunk/WebKit/mac/History/WebHistory.mm

    r42796 r43937  
    582582- (NSData *)data
    583583{
    584     if (_entriesByDate->isEmpty())
    585         return nil;
     584    if (_entriesByDate->isEmpty()) {
     585        static NSData *emptyHistoryData = (NSData *)CFDataCreate(0, 0, 0);
     586        return emptyHistoryData;
     587    }
    586588   
    587589    // Ignores the date and item count limits; these are respected when loading instead of when saving, so
Note: See TracChangeset for help on using the changeset viewer.