Made -[WebHistoryItem copyWithZone:] allocate an object of the same class as the...
[WebKit-https.git] / Source / WebKit / mac / History / WebHistoryItem.mm
index 646d8bebb1fbc02832d3b2d1a268be845a2498b2..653b1afae6d8ddcf1683366ce169e80cce065e26 100644 (file)
@@ -141,7 +141,7 @@ void WKNotifyHistoryItemChanged(HistoryItem*)
 - (id)copyWithZone:(NSZone *)zone
 {
     WebCoreThreadViolationCheckRoundOne();
-    WebHistoryItem *copy = [[WebHistoryItem alloc] initWithWebCoreHistoryItem:core(_private)->copy()];
+    WebHistoryItem *copy = [[[self class] alloc] initWithWebCoreHistoryItem:core(_private)->copy()];
     historyItemWrappers().set(core(copy->_private), copy);
 
     return copy;