<rdar://problem/31614010>
Created attachment 308235 [details] First pass
Comment on attachment 308235 [details] First pass View in context: https://bugs.webkit.org/attachment.cgi?id=308235&action=review > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:182 > + RetainPtr<NSArray> _typeToFileURLMaps; What's with all these NSArrays? (no need to fix in this patch though) > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:294 > + // We've already loaded data relevant for this UTI type into disk, so there's no need to ask the UIItemProvider for the same data again. into disk? onto disk? > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:295 > + if (NSData *result = [NSData dataWithContentsOfURL:typeToFileURLMap[loadedType] options:NSDataReadingMappedAlways error:nil]) Should we go with Always or IfSafe?
(In reply to Tim Horton from comment #2) > Comment on attachment 308235 [details] > First pass > > View in context: > https://bugs.webkit.org/attachment.cgi?id=308235&action=review > > > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:182 > > + RetainPtr<NSArray> _typeToFileURLMaps; > > What's with all these NSArrays? (no need to fix in this patch though) There's no particular reason these are just NSArrays :/ I'll refactor these to be Vector<RetainPtr<NSString>> in a followup patch. > > > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:294 > > + // We've already loaded data relevant for this UTI type into disk, so there's no need to ask the UIItemProvider for the same data again. > > into disk? onto disk? s/into/onto/ > > > Source/WebCore/platform/ios/WebItemProviderPasteboard.mm:295 > > + if (NSData *result = [NSData dataWithContentsOfURL:typeToFileURLMap[loadedType] options:NSDataReadingMappedAlways error:nil]) > > Should we go with Always or IfSafe? Good point. Changed to use NSDataReadingMappedIfSafe. Committed <https://trac.webkit.org/changeset/215835>