WebKit Bugzilla
Attachment 348301 Details for
Bug 189049
: [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189049-20180828100057.patch (text/plain), 2.34 KB, created by
Wenson Hsieh
on 2018-08-28 10:00:58 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Wenson Hsieh
Created:
2018-08-28 10:00:58 PDT
Size:
2.34 KB
patch
obsolete
>Subversion Revision: 235418 >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index f7509116444599c491a07550cc2eaf464ce98f62..6689522fa15ae9144486637ca36124ee47c836d7 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2018-08-28 Wenson Hsieh <wenson_hsieh@apple.com> >+ >+ [iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator >+ https://bugs.webkit.org/show_bug.cgi?id=189049 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the >+ load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`. >+ >+ * TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm: >+ (simulateFolderDragWithURL): >+ > 2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com> > > [Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends >diff --git a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm >index 70d227057c734685269cf16724daa576d8bb08c9..68d19ad669f5488d575c38b8484b3b08ca9b799a 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm >+++ b/Tools/TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm >@@ -416,8 +416,8 @@ static void simulateFolderDragWithURL(DragAndDropSimulator *simulator, NSURL *fo > auto folderProvider = adoptNS([[NSItemProvider alloc] init]); > [folderProvider setSuggestedName:folderURL.lastPathComponent]; > [folderProvider setPreferredPresentationStyle:UIPreferredPresentationStyleAttachment]; >- [folderProvider registerFileRepresentationForTypeIdentifier:(__bridge NSString *)kUTTypeFolder fileOptions:0 visibility:NSItemProviderRepresentationVisibilityAll loadHandler:[&] (void(^completion)(NSURL *, BOOL, NSError *)) -> NSProgress * { >- completion(folderURL, NO, nil); >+ [folderProvider registerFileRepresentationForTypeIdentifier:(__bridge NSString *)kUTTypeFolder fileOptions:0 visibility:NSItemProviderRepresentationVisibilityAll loadHandler:[protectedFolderURL = retainPtr(folderURL)] (void(^completion)(NSURL *, BOOL, NSError *)) -> NSProgress * { >+ completion(protectedFolderURL.get(), NO, nil); > return nil; > }]; > simulator.externalItemProviders = @[ folderProvider.get() ];
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189049
: 348301