WebKit Bugzilla
Attachment 361221 Details for
Bug 194301
: Reproducible crash under WKShareSheet presentWithParameters when cancelling a share
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
for cq
a.diff (text/plain), 2.10 KB, created by
Tim Horton
on 2019-02-05 14:24:02 PST
(
hide
)
Description:
for cq
Filename:
MIME Type:
Creator:
Tim Horton
Created:
2019-02-05 14:24:02 PST
Size:
2.10 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240992) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2019-02-05 Tim Horton <timothy_horton@apple.com> >+ >+ Reproducible crash under WKShareSheet presentWithParameters when cancelling a share >+ https://bugs.webkit.org/show_bug.cgi?id=194301 >+ <rdar://problem/47719379> >+ >+ Reviewed by Beth Dakin. >+ >+ * UIProcess/Cocoa/WKShareSheet.mm: >+ (-[WKShareSheet presentWithParameters:completionHandler:]): >+ NSSharingServicePicker's delegate callbacks can be called synchronously. >+ We release the WKShareSheet (which holds our reference to the NSSharingServicePicker) >+ under sharingServicePicker:didChooseSharingService:. On older versions of macOS, >+ there was nothing keeping the NSSharingServicePicker alive inside >+ showRelativeToRect:ofView:preferredEdge:, thus the whole chain of references would >+ fall and result in sending a message to a released NSSharingServicePicker. >+ To resolve this, keep an extra reference to the WKShareSheet until >+ presentation is complete. >+ > 2019-02-05 Brady Eidson <beidson@apple.com> > > Add a new DownloadMap type that manages taking an assertion automatically. >Index: Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm (revision 240992) >+++ Source/WebKit/UIProcess/Cocoa/WKShareSheet.mm (working copy) >@@ -101,6 +101,9 @@ > _sharingServicePicker = adoptNS([[NSSharingServicePicker alloc] initWithItems:shareDataArray.get()]); > _sharingServicePicker.get().delegate = self; > >+ // WKShareSheet can be released under NSSharingServicePicker delegate callbacks. >+ RetainPtr<WKShareSheet> protector(self); >+ > NSPoint location = [NSEvent mouseLocation]; > NSRect mouseLocationRect = NSMakeRect(location.x, location.y, 1.0, 1.0); > NSRect mouseLocationInWindow = [webView.window convertRectFromScreen:mouseLocationRect];
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 194301
:
361220
| 361221