[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser/tor-browser-60.4.0esr-8.5-1] Bug 1487263 - set requesting principal for macOS drags, r=mstange



commit 5cc364bf650ec604043b6394c6d2525789e61f3a
Author: Gijs Kruitbosch <gijskruitbosch@xxxxxxxxx>
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);



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits