[Cocoa] Wrappers' -copyWithZone: should copy if the collection is mutable
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 03:01:01 +0000 (03:01 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 4 Nov 2013 03:01:01 +0000 (03:01 +0000)
commit453fa73bee4731de55781da37ae441f0bdd62fcd
treef6ca87a76bed0077f191dcc8f23948808e7d4d81
parentcab8bc8bb575be5f8ab12c91fa3e62e178c33509
[Cocoa] Wrappers' -copyWithZone: should copy if the collection is mutable
https://bugs.webkit.org/show_bug.cgi?id=123707

Reviewed by Geoff Garen and Anders Carlsson.

* Shared/Cocoa/WKNSArray.mm:
(-[WKNSArray copyWithZone:]): If the array is mutable, make a copy.
* Shared/Cocoa/WKNSDictionary.mm:
(-[WKNSDictionary copyWithZone:]): If the dictionary is mutable, make a copy.
* Shared/ImmutableArray.h:
(WebKit::ImmutableArray::entries): Added this accessor.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@158553 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/Cocoa/WKNSArray.mm
Source/WebKit2/Shared/Cocoa/WKNSDictionary.mm
Source/WebKit2/Shared/ImmutableArray.h