[webkit-changes] cvs commit: WebKit/History.subproj WebHistory.m
WebHistoryItem.m
John
sullivan at opensource.apple.com
Mon Nov 28 12:24:07 PST 2005
sullivan 05/11/28 12:24:06
Modified: . ChangeLog
History.subproj WebHistory.m WebHistoryItem.m
Log:
Reviewed by Tim Omernick.
Probable fix for <rdar://problem/4356060> crash in -[WebHistoryItem _mergeAutoCompleteHints:]
* History.subproj/WebHistory.m:
(-[WebHistoryPrivate addItem:]):
retain/release oldEntry until we're done with it, since removing it from dictionary might
cause it to be dealloc'ed otherwise.
* History.subproj/WebHistoryItem.m:
(-[WebHistoryItem _mergeAutoCompleteHints:]):
added an assert
Revision Changes Path
1.3375 +15 -0 WebKit/ChangeLog
Index: ChangeLog
===================================================================
RCS file: /cvs/root/WebKit/ChangeLog,v
retrieving revision 1.3374
retrieving revision 1.3375
diff -u -r1.3374 -r1.3375
--- ChangeLog 27 Nov 2005 06:36:14 -0000 1.3374
+++ ChangeLog 28 Nov 2005 20:23:58 -0000 1.3375
@@ -1,3 +1,18 @@
+2005-11-28 John Sullivan <sullivan at apple.com>
+
+ Reviewed by Tim Omernick.
+
+ Probable fix for <rdar://problem/4356060> crash in -[WebHistoryItem _mergeAutoCompleteHints:]
+
+ * History.subproj/WebHistory.m:
+ (-[WebHistoryPrivate addItem:]):
+ retain/release oldEntry until we're done with it, since removing it from dictionary might
+ cause it to be dealloc'ed otherwise.
+
+ * History.subproj/WebHistoryItem.m:
+ (-[WebHistoryItem _mergeAutoCompleteHints:]):
+ added an assert
+
2005-11-26 Alexey Proskuryakov <ap at nypop.com>
Reviewed by mjs. Committed by eseidel.
1.42 +4 -0 WebKit/History.subproj/WebHistory.m
Index: WebHistory.m
===================================================================
RCS file: /cvs/root/WebKit/History.subproj/WebHistory.m,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- WebHistory.m 2 Nov 2005 00:27:36 -0000 1.41
+++ WebHistory.m 28 Nov 2005 20:24:06 -0000 1.42
@@ -199,11 +199,15 @@
WebHistoryItem *oldEntry = [_entriesByURL objectForKey:URLString];
if (oldEntry) {
+ // The last reference to oldEntry might be this dictionary, so we hold onto a reference
+ // until we're done with oldEntry.
+ [oldEntry retain];
[self removeItemForURLString:URLString];
// If we already have an item with this URL, we need to merge info that drives the
// URL autocomplete heuristics from that item into the new one.
[entry _mergeAutoCompleteHints:oldEntry];
+ [oldEntry release];
}
[self _addItemToDateCaches:entry];
1.94 +2 -0 WebKit/History.subproj/WebHistoryItem.m
Index: WebHistoryItem.m
===================================================================
RCS file: /cvs/root/WebKit/History.subproj/WebHistoryItem.m,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -r1.93 -r1.94
--- WebHistoryItem.m 1 Nov 2005 19:24:49 -0000 1.93
+++ WebHistoryItem.m 28 Nov 2005 20:24:06 -0000 1.94
@@ -544,6 +544,8 @@
- (void)_mergeAutoCompleteHints:(WebHistoryItem *)otherItem
{
+ ASSERT_ARG(otherItem, otherItem);
+
if (otherItem != self) {
_private->visitCount += otherItem->_private->visitCount;
}
More information about the webkit-changes
mailing list