commit 5cc364bf650ec604043b6394c6d2525789e61f3a Author: Gijs Kruitbosch gijskruitbosch@gmail.com Date: Thu Aug 30 13:56:44 2018 +0000
Bug 1487263 - set requesting principal for macOS drags, r=mstange
The requesting principal is now required for saving content through nsIWebBrowserPersist, and so drag sessions on macOS need to provide one, just like drag sessions on Windows already do (see bug 664717).
Differential Revision: https://phabricator.services.mozilla.com/D4673
--HG-- extra : moz-landing-system : lando --- widget/cocoa/nsDragService.mm | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/widget/cocoa/nsDragService.mm b/widget/cocoa/nsDragService.mm index 8ee0f3edabfc..47eacb5792a2 100644 --- a/widget/cocoa/nsDragService.mm +++ b/widget/cocoa/nsDragService.mm @@ -326,6 +326,9 @@ nsDragService::InvokeDragSessionImpl(nsIArray* aTransferableArray, return NS_ERROR_FAILURE; }
+ // Assign a principal: + currentTransferable->SetRequestingPrincipal(mSourceNode->NodePrincipal()); + // Transform the transferable to an NSDictionary NSDictionary* pasteboardOutputDict = nsClipboard::PasteboardDictFromTransferable(currentTransferable);
tbb-commits@lists.torproject.org