Title: [158552] trunk/Source/WebKit2
- Revision
- 158552
- Author
- m...@apple.com
- Date
- 2013-11-03 18:57:56 -0800 (Sun, 03 Nov 2013)
Log Message
Reverted r158538.
* Shared/Cocoa/WKNSArray.mm:
(-[WKNSArray copyWithZone:]):
* Shared/Cocoa/WKNSDictionary.mm:
(-[WKNSDictionary copyWithZone:]):
* Shared/ImmutableArray.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (158551 => 158552)
--- trunk/Source/WebKit2/ChangeLog 2013-11-04 00:39:21 UTC (rev 158551)
+++ trunk/Source/WebKit2/ChangeLog 2013-11-04 02:57:56 UTC (rev 158552)
@@ -1,5 +1,15 @@
2013-11-03 Dan Bernstein <m...@apple.com>
+ Reverted r158538.
+
+ * Shared/Cocoa/WKNSArray.mm:
+ (-[WKNSArray copyWithZone:]):
+ * Shared/Cocoa/WKNSDictionary.mm:
+ (-[WKNSDictionary copyWithZone:]):
+ * Shared/ImmutableArray.h:
+
+2013-11-03 Dan Bernstein <m...@apple.com>
+
[Cocoa] Wrappers' -copyWithZone: should copy if the collection is mutable
https://bugs.webkit.org/show_bug.cgi?id=123707
Modified: trunk/Source/WebKit2/Shared/Cocoa/WKNSArray.mm (158551 => 158552)
--- trunk/Source/WebKit2/Shared/Cocoa/WKNSArray.mm 2013-11-04 00:39:21 UTC (rev 158551)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSArray.mm 2013-11-04 02:57:56 UTC (rev 158552)
@@ -58,11 +58,7 @@
- (id)copyWithZone:(NSZone *)zone
{
- if (!reinterpret_cast<ImmutableArray*>(&_array)->isMutable())
- return [self retain];
-
- auto entries = reinterpret_cast<ImmutableArray*>(&_array)->entries();
- return ImmutableArray::adopt(entries).leakRef()->wrapper();
+ return [self retain];
}
#pragma mark WKObject protocol implementation
Modified: trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm (158551 => 158552)
--- trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm 2013-11-04 00:39:21 UTC (rev 158551)
+++ trunk/Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm 2013-11-04 02:57:56 UTC (rev 158552)
@@ -78,11 +78,7 @@
- (id)copyWithZone:(NSZone *)zone
{
- if (!reinterpret_cast<ImmutableDictionary*>(&_dictionary)->isMutable())
- return [self retain];
-
- auto map = reinterpret_cast<ImmutableDictionary*>(&_dictionary)->map();
- return ImmutableDictionary::adopt(map).leakRef()->wrapper();
+ return [self retain];
}
#pragma mark WKObject protocol implementation
Modified: trunk/Source/WebKit2/Shared/ImmutableArray.h (158551 => 158552)
--- trunk/Source/WebKit2/Shared/ImmutableArray.h 2013-11-04 00:39:21 UTC (rev 158551)
+++ trunk/Source/WebKit2/Shared/ImmutableArray.h 2013-11-04 02:57:56 UTC (rev 158552)
@@ -65,8 +65,6 @@
virtual bool isMutable() { return false; }
- const Vector<RefPtr<APIObject>>& entries() { return m_entries; }
-
protected:
ImmutableArray();
ImmutableArray(AdoptTag, APIObject** entries, size_t);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes