Title: [104613] trunk/Source/WebKit/mac
Revision
104613
Author
[email protected]
Date
2012-01-10 12:01:04 -0800 (Tue, 10 Jan 2012)

Log Message

Change -[WebHistoryItem copyWithZone:] to not use NSCopyObject()
https://bugs.webkit.org/show_bug.cgi?id=75980

Reviewed by Mark Rowe.

* History/WebHistoryItem.mm:
(-[WebHistoryItem copyWithZone:]): Replaced NSCopyObject() with
-alloc, -initWithWebCoreHistoryItem:.

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (104612 => 104613)


--- trunk/Source/WebKit/mac/ChangeLog	2012-01-10 19:57:31 UTC (rev 104612)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-01-10 20:01:04 UTC (rev 104613)
@@ -1,3 +1,14 @@
+2012-01-10  Dan Bernstein  <[email protected]>
+
+        Change -[WebHistoryItem copyWithZone:] to not use NSCopyObject()
+        https://bugs.webkit.org/show_bug.cgi?id=75980
+
+        Reviewed by Mark Rowe.
+
+        * History/WebHistoryItem.mm:
+        (-[WebHistoryItem copyWithZone:]): Replaced NSCopyObject() with
+        -alloc, -initWithWebCoreHistoryItem:.
+
 2012-01-06  Simon Fraser  <[email protected]>
 
         Mitigate scrollbar differences when running pixel tests

Modified: trunk/Source/WebKit/mac/History/WebHistoryItem.mm (104612 => 104613)


--- trunk/Source/WebKit/mac/History/WebHistoryItem.mm	2012-01-10 19:57:31 UTC (rev 104612)
+++ trunk/Source/WebKit/mac/History/WebHistoryItem.mm	2012-01-10 20:01:04 UTC (rev 104613)
@@ -141,11 +141,9 @@
 - (id)copyWithZone:(NSZone *)zone
 {
     WebCoreThreadViolationCheckRoundOne();
-    WebHistoryItem *copy = (WebHistoryItem *)NSCopyObject(self, 0, zone);
-    RefPtr<HistoryItem> item = core(_private)->copy();
-    copy->_private = kitPrivate(item.get());
-    historyItemWrappers().set(item.release().leakRef(), copy);
-    
+    WebHistoryItem *copy = [[WebHistoryItem alloc] initWithWebCoreHistoryItem:core(_private)->copy()];
+    historyItemWrappers().set(core(copy->_private), copy);
+
     return copy;
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to