Use CFArrayGetValues() in createArchiveList() in WebCoreArgumentCodersMac.mm. Via Darin Adler in Bug 210448, Comment #4: Separately, I suggest we rewrite this using CFArrayGetValues, rather than calling CFArrayGetValueAtIndex over and over again in a loop. We will still have to loop over the buffer to convert tokenNull into nullptr, but it should be more efficient to do it that way rather than call CFArrayGetValueAtIndex over and over again.
Created attachment 396472 [details] Patch v1
Comment on attachment 396472 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=396472&action=review > Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm:127 > + for (size_t i = 0; i < static_cast<size_t>(*objectCount); ++i) { This line should not have been changed. There’s no reason to cast this just so we can use a different type for the loop. CFIndex is fine.
Comment on attachment 396472 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=396472&action=review >> Source/WebKit/Shared/mac/WebCoreArgumentCodersMac.mm:127 >> + for (size_t i = 0; i < static_cast<size_t>(*objectCount); ++i) { > > This line should not have been changed. There’s no reason to cast this just so we can use a different type for the loop. CFIndex is fine. Will change back. I seem to recall there's a clang warning about using a signed type for an array index, which is why I changed it.
Committed r260111: <https://trac.webkit.org/changeset/260111>
<rdar://problem/61800359>