Backed out changeset a7ac9f64f6ea (bug 1561056) for build bustage at widget/gtk/nsDragService. On a CLOSED TREE
authorDaniel Varga <dvarga@mozilla.com>
Fri, 16 Aug 2019 09:30:39 +0300
changeset 488438 0c769cff316532f09812f8315e97787e7cc67131
parent 488437 cf52300e04c94da713159e613f6bfaf9aa0a6da4
child 488439 5d4cbfe103bbc517599231eb33d4f3ebbbcede40
child 488440 e3f6e2f3e216b5504640481a25b2277e9882c474
push id36443
push userccoroiu@mozilla.com
push dateFri, 16 Aug 2019 09:48:15 +0000
treeherdermozilla-central@5d4cbfe103bb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1561056
milestone70.0a1
backs outa7ac9f64f6ea3fd6faf7263c18f20c7dae9d20ec
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset a7ac9f64f6ea (bug 1561056) for build bustage at widget/gtk/nsDragService. On a CLOSED TREE
browser/base/content/tabbrowser-tabs.js
dom/base/ContentAreaDropListener.jsm
dom/base/nsContentAreaDragDrop.cpp
dom/base/nsContentAreaDragDrop.h
dom/events/DataTransfer.cpp
dom/events/DataTransfer.h
dom/events/EventStateManager.cpp
dom/events/EventStateManager.h
dom/events/RemoteDragStartData.cpp
dom/events/RemoteDragStartData.h
dom/ipc/BrowserChild.cpp
dom/ipc/BrowserChild.h
dom/ipc/BrowserParent.cpp
dom/ipc/BrowserParent.h
dom/ipc/PBrowser.ipdl
dom/webidl/DataTransfer.webidl
widget/nsBaseDragService.cpp
widget/nsBaseDragService.h
widget/nsDragServiceProxy.cpp
widget/nsIDragService.idl
widget/nsIDragSession.idl
--- a/browser/base/content/tabbrowser-tabs.js
+++ b/browser/base/content/tabbrowser-tabs.js
@@ -746,17 +746,17 @@
           inBackground = !inBackground;
         }
 
         let targetTab = this._getDragTargetTab(event, true);
         let userContextId = this.selectedItem.getAttribute("usercontextid");
         let replace = !!targetTab;
         let newIndex = this._getDropIndex(event, true);
         let urls = links.map(link => link.url);
-        let csp = browserDragAndDrop.getCSP(event);
+
         let triggeringPrincipal = browserDragAndDrop.getTriggeringPrincipal(
           event
         );
 
         (async () => {
           if (
             urls.length >=
             Services.prefs.getIntPref("browser.tabs.maxOpenBeforeWarn")
@@ -774,17 +774,16 @@
           gBrowser.loadTabs(urls, {
             inBackground,
             replace,
             allowThirdPartyFixup: true,
             targetTab,
             newIndex,
             userContextId,
             triggeringPrincipal,
-            csp,
           });
         })();
       }
 
       if (draggedTab) {
         delete draggedTab._dragData;
       }
     }
--- a/dom/base/ContentAreaDropListener.jsm
+++ b/dom/base/ContentAreaDropListener.jsm
@@ -214,20 +214,16 @@ ContentAreaDropListener.prototype = {
 
   getTriggeringPrincipal: function(aEvent) {
     let dataTransfer = aEvent.dataTransfer;
     return this._getTriggeringPrincipalFromDataTransfer(dataTransfer, true);
   },
 
   getCSP: function(aEvent) {
     let sourceNode = aEvent.dataTransfer.mozSourceNode;
-    if (aEvent.dataTransfer.mozCSP !== null) {
-      return aEvent.dataTransfer.mozCSP;
-    }
-
     if (
       sourceNode &&
       (sourceNode.localName !== "browser" ||
         sourceNode.namespaceURI !==
           "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul")
     ) {
       // Use sourceNode's csp only if the sourceNode is not browser.
       //
--- a/dom/base/nsContentAreaDragDrop.cpp
+++ b/dom/base/nsContentAreaDragDrop.cpp
@@ -60,17 +60,17 @@ using namespace mozilla::dom;
 using mozilla::IgnoreErrors;
 
 class MOZ_STACK_CLASS DragDataProducer {
  public:
   DragDataProducer(nsPIDOMWindowOuter* aWindow, nsIContent* aTarget,
                    nsIContent* aSelectionTargetNode, bool aIsAltKeyPressed);
   nsresult Produce(DataTransfer* aDataTransfer, bool* aCanDrag,
                    Selection** aSelection, nsIContent** aDragNode,
-                   nsIPrincipal** aPrincipal, nsIContentSecurityPolicy** aCsp);
+                   nsIPrincipal** aPrincipal);
 
  private:
   void AddString(DataTransfer* aDataTransfer, const nsAString& aFlavor,
                  const nsAString& aData, nsIPrincipal* aPrincipal,
                  bool aHidden = false);
   nsresult AddStringsToDataTransfer(nsIContent* aDragNode,
                                     DataTransfer* aDataTransfer);
   nsresult GetImageData(imgIContainer* aImage, imgIRequest* aRequest);
@@ -105,26 +105,25 @@ class MOZ_STACK_CLASS DragDataProducer {
   bool mIsAnchor;
   nsCOMPtr<imgIContainer> mImage;
 };
 
 nsresult nsContentAreaDragDrop::GetDragData(
     nsPIDOMWindowOuter* aWindow, nsIContent* aTarget,
     nsIContent* aSelectionTargetNode, bool aIsAltKeyPressed,
     DataTransfer* aDataTransfer, bool* aCanDrag, Selection** aSelection,
-    nsIContent** aDragNode, nsIPrincipal** aPrincipal,
-    nsIContentSecurityPolicy** aCsp) {
+    nsIContent** aDragNode, nsIPrincipal** aPrincipal) {
   NS_ENSURE_TRUE(aSelectionTargetNode, NS_ERROR_INVALID_ARG);
 
   *aCanDrag = true;
 
   DragDataProducer provider(aWindow, aTarget, aSelectionTargetNode,
                             aIsAltKeyPressed);
   return provider.Produce(aDataTransfer, aCanDrag, aSelection, aDragNode,
-                          aPrincipal, aCsp);
+                          aPrincipal);
 }
 
 NS_IMPL_ISUPPORTS(nsContentAreaDragDropDataProvider, nsIFlavorDataProvider)
 
 // SaveURIToFile
 // used on platforms where it's possible to drag items (e.g. images)
 // into the file system
 nsresult nsContentAreaDragDropDataProvider::SaveURIToFile(
@@ -487,18 +486,17 @@ nsresult DragDataProducer::GetImageData(
   }
 
   return NS_OK;
 }
 
 nsresult DragDataProducer::Produce(DataTransfer* aDataTransfer, bool* aCanDrag,
                                    Selection** aSelection,
                                    nsIContent** aDragNode,
-                                   nsIPrincipal** aPrincipal,
-                                   nsIContentSecurityPolicy** aCsp) {
+                                   nsIPrincipal** aPrincipal) {
   MOZ_ASSERT(aCanDrag && aSelection && aDataTransfer && aDragNode,
              "null pointer passed to Produce");
   NS_ASSERTION(mWindow, "window not set");
   NS_ASSERTION(mSelectionTargetNode,
                "selection target node should have been set");
 
   *aDragNode = nullptr;
 
@@ -717,21 +715,16 @@ nsresult DragDataProducer::Produce(DataT
     mHtmlString.Truncate();
     mContextString.Truncate();
     mInfoString.Truncate();
     mTitleString.Truncate();
 
     nsCOMPtr<Document> doc = mWindow->GetDoc();
     NS_ENSURE_TRUE(doc, NS_ERROR_FAILURE);
 
-    nsCOMPtr<nsIContentSecurityPolicy> csp = doc->GetCsp();
-    if (csp) {
-      NS_IF_ADDREF(*aCsp = csp);
-    }
-
     // if we have selected text, use it in preference to the node
     nsCOMPtr<nsITransferable> transferable;
     if (*aSelection) {
       rv = nsCopySupport::GetTransferableForSelection(
           *aSelection, doc, getter_AddRefs(transferable));
     } else {
       rv = nsCopySupport::GetTransferableForNode(nodeToSerialize, doc,
                                                  getter_AddRefs(transferable));
--- a/dom/base/nsContentAreaDragDrop.h
+++ b/dom/base/nsContentAreaDragDrop.h
@@ -43,27 +43,25 @@ class nsContentAreaDragDrop {
    * aCanDrag - [out] set to true if the drag may proceed, false to stop the
    *            drag entirely
    * aSelection - [out] set to the selection being dragged, or null if no
    *                    selection is being dragged.
    * aDragNode - [out] the link, image or area being dragged, or null if the
    *             drag occurred on another element.
    * aPrincipal - [out] set to the triggering principal of the drag, or null if
    *                    it's from browser chrome or OS
-   * aCSP       - [out] set to the CSP of the Drag, or null if
-   *                    it's from browser chrome or OS
    */
   static nsresult GetDragData(nsPIDOMWindowOuter* aWindow, nsIContent* aTarget,
                               nsIContent* aSelectionTargetNode,
                               bool aIsAltKeyPressed,
                               mozilla::dom::DataTransfer* aDataTransfer,
                               bool* aCanDrag,
                               mozilla::dom::Selection** aSelection,
-                              nsIContent** aDragNode, nsIPrincipal** aPrincipal,
-                              nsIContentSecurityPolicy** aCsp);
+                              nsIContent** aDragNode,
+                              nsIPrincipal** aPrincipal);
 };
 
 // this is used to save images to disk lazily when the image data is asked for
 // during the drop instead of when it is added to the drag data transfer. This
 // ensures that the image data is only created when an image drop is allowed.
 class nsContentAreaDragDropDataProvider : public nsIFlavorDataProvider {
   virtual ~nsContentAreaDragDropDataProvider() {}
 
--- a/dom/events/DataTransfer.cpp
+++ b/dom/events/DataTransfer.cpp
@@ -313,26 +313,16 @@ void DataTransfer::GetMozTriggeringPrinc
   if (NS_FAILED(rv)) {
     aPrincipalURISpec.Truncate(0);
     return;
   }
 
   CopyUTF8toUTF16(spec, aPrincipalURISpec);
 }
 
-nsIContentSecurityPolicy* DataTransfer::GetMozCSP() {
-  nsCOMPtr<nsIDragSession> dragSession = nsContentUtils::GetDragSession();
-  if (!dragSession) {
-    return nullptr;
-  }
-  nsCOMPtr<nsIContentSecurityPolicy> csp;
-  dragSession->GetCsp(getter_AddRefs(csp));
-  return csp;
-}
-
 already_AddRefed<FileList> DataTransfer::GetFiles(
     nsIPrincipal& aSubjectPrincipal) {
   return mItems->Files(&aSubjectPrincipal);
 }
 
 void DataTransfer::GetTypes(nsTArray<nsString>& aTypes,
                             CallerType aCallerType) const {
   // When called from bindings, aTypes will be empty, but since we might have
--- a/dom/events/DataTransfer.h
+++ b/dom/events/DataTransfer.h
@@ -269,18 +269,16 @@ class DataTransfer final : public nsISup
   /*
    * Integer version of effectAllowed, set to one or a combination of the
    * constants in nsIDragService.
    */
   uint32_t EffectAllowedInt() const { return mEffectAllowed; }
 
   void GetMozTriggeringPrincipalURISpec(nsAString& aPrincipalURISpec);
 
-  nsIContentSecurityPolicy* GetMozCSP();
-
   mozilla::dom::Element* GetDragTarget() const { return mDragTarget; }
 
   nsresult GetDataAtNoSecurityCheck(const nsAString& aFormat, uint32_t aIndex,
                                     nsIVariant** aData);
 
   DataTransferItemList* Items() const { return mItems; }
 
   // Returns the current "Drag Data Store Mode" of the DataTransfer. This
--- a/dom/events/EventStateManager.cpp
+++ b/dom/events/EventStateManager.cpp
@@ -1285,33 +1285,29 @@ void EventStateManager::DispatchCrossPro
     case eDragEventClass: {
       RefPtr<BrowserParent> browserParent = remote;
       browserParent->Manager()->MaybeInvokeDragSession(browserParent);
 
       nsCOMPtr<nsIDragSession> dragSession = nsContentUtils::GetDragSession();
       uint32_t dropEffect = nsIDragService::DRAGDROP_ACTION_NONE;
       uint32_t action = nsIDragService::DRAGDROP_ACTION_NONE;
       nsCOMPtr<nsIPrincipal> principal;
-      nsCOMPtr<nsIContentSecurityPolicy> csp;
-
       if (dragSession) {
         dragSession->DragEventDispatchedToChildProcess();
         dragSession->GetDragAction(&action);
         dragSession->GetTriggeringPrincipal(getter_AddRefs(principal));
-        dragSession->GetCsp(getter_AddRefs(csp));
         RefPtr<DataTransfer> initialDataTransfer =
             dragSession->GetDataTransfer();
         if (initialDataTransfer) {
           dropEffect = initialDataTransfer->DropEffectInt();
         }
       }
 
       browserParent->SendRealDragEvent(*aEvent->AsDragEvent(), action,
-                                       dropEffect, IPC::Principal(principal),
-                                       csp);
+                                       dropEffect, IPC::Principal(principal));
       return;
     }
     case ePluginEventClass: {
       *aStatus = nsEventStatus_eConsumeNoDefault;
       remote->SendPluginEvent(*aEvent->AsPluginEvent());
       return;
     }
     default: {
@@ -1793,17 +1789,16 @@ void EventStateManager::GenerateDragGest
           dataTransfer->Disconnect();
         }
       });
 
       RefPtr<Selection> selection;
       RefPtr<RemoteDragStartData> remoteDragStartData;
       nsCOMPtr<nsIContent> eventContent, targetContent;
       nsCOMPtr<nsIPrincipal> principal;
-      nsCOMPtr<nsIContentSecurityPolicy> csp;
       mCurrentTarget->GetContentForEvent(aEvent, getter_AddRefs(eventContent));
       if (eventContent) {
         // If the content is a text node in a password field, we shouldn't
         // allow to drag its raw text.  Note that we've supported drag from
         // password fields but dragging data was masked text.  So, it doesn't
         // make sense anyway.
         if (eventContent->IsText() && eventContent->HasFlag(NS_MAYBE_MASKED)) {
           // However, it makes sense to allow to drag selected password text
@@ -1817,17 +1812,17 @@ void EventStateManager::GenerateDragGest
           if (!textEditor || !textEditor->IsCopyToClipboardAllowed()) {
             StopTrackingDragGesture();
             return;
           }
         }
         DetermineDragTargetAndDefaultData(
             window, eventContent, dataTransfer, getter_AddRefs(selection),
             getter_AddRefs(remoteDragStartData), getter_AddRefs(targetContent),
-            getter_AddRefs(principal), getter_AddRefs(csp));
+            getter_AddRefs(principal));
       }
 
       // Stop tracking the drag gesture now. This should stop us from
       // reentering GenerateDragGesture inside DOM event processing.
       StopTrackingDragGesture();
 
       if (!targetContent) return;
 
@@ -1872,27 +1867,26 @@ void EventStateManager::GenerateDragGest
       nsEventStatus status = nsEventStatus_eIgnore;
       EventDispatcher::Dispatch(targetContent, aPresContext, &startEvent,
                                 nullptr, &status);
 
       WidgetDragEvent* event = &startEvent;
 
       nsCOMPtr<nsIObserverService> observerService =
           mozilla::services::GetObserverService();
-      // Emit observer event to allow addons to modify the DataTransfer
-      // object.
+      // Emit observer event to allow addons to modify the DataTransfer object.
       if (observerService) {
         observerService->NotifyObservers(dataTransfer,
                                          "on-datatransfer-available", nullptr);
       }
 
       if (status != nsEventStatus_eConsumeNoDefault) {
         bool dragStarted =
             DoDefaultDragStart(aPresContext, event, dataTransfer, targetContent,
-                               selection, remoteDragStartData, principal, csp);
+                               selection, remoteDragStartData, principal);
         if (dragStarted) {
           sActiveESM = nullptr;
           MaybeFirePointerCancel(aEvent);
           aEvent->StopPropagation();
         }
       }
 
       // Reset mCurretTargetContent to what it was
@@ -1904,49 +1898,48 @@ void EventStateManager::GenerateDragGest
     FlushPendingEvents(aPresContext);
   }
 }  // GenerateDragGesture
 
 void EventStateManager::DetermineDragTargetAndDefaultData(
     nsPIDOMWindowOuter* aWindow, nsIContent* aSelectionTarget,
     DataTransfer* aDataTransfer, Selection** aSelection,
     RemoteDragStartData** aRemoteDragStartData, nsIContent** aTargetNode,
-    nsIPrincipal** aPrincipal, nsIContentSecurityPolicy** aCsp) {
+    nsIPrincipal** aPrincipal) {
   *aTargetNode = nullptr;
 
   nsCOMPtr<nsIContent> dragDataNode;
 
   nsIContent* editingElement = aSelectionTarget->IsEditable()
                                    ? aSelectionTarget->GetEditingHost()
                                    : nullptr;
 
   // In chrome, only allow dragging inside editable areas.
   bool isChromeContext = !aWindow->GetBrowsingContext()->IsContent();
   if (isChromeContext && !editingElement) {
     if (mGestureDownDragStartData) {
       // A child process started a drag so use any data it assigned for the dnd
       // session.
-      mGestureDownDragStartData->AddInitialDnDDataTo(aDataTransfer, aPrincipal,
-                                                     aCsp);
+      mGestureDownDragStartData->AddInitialDnDDataTo(aDataTransfer, aPrincipal);
       mGestureDownDragStartData.forget(aRemoteDragStartData);
     }
   } else {
     mGestureDownDragStartData = nullptr;
 
     // GetDragData determines if a selection, link or image in the content
     // should be dragged, and places the data associated with the drag in the
     // data transfer.
     // mGestureDownContent is the node where the mousedown event for the drag
     // occurred, and aSelectionTarget is the node to use when a selection is
     // used
     bool canDrag;
     bool wasAlt = (mGestureModifiers & MODIFIER_ALT) != 0;
     nsresult rv = nsContentAreaDragDrop::GetDragData(
         aWindow, mGestureDownContent, aSelectionTarget, wasAlt, aDataTransfer,
-        &canDrag, aSelection, getter_AddRefs(dragDataNode), aPrincipal, aCsp);
+        &canDrag, aSelection, getter_AddRefs(dragDataNode), aPrincipal);
     if (NS_FAILED(rv) || !canDrag) {
       return;
     }
   }
 
   // if GetDragData returned a node, use that as the node being dragged.
   // Otherwise, if a selection is being dragged, use the node within the
   // selection that was dragged. Otherwise, just use the mousedown target.
@@ -1998,18 +1991,17 @@ void EventStateManager::DetermineDragTar
     *aTargetNode = dragContent;
     NS_ADDREF(*aTargetNode);
   }
 }
 
 bool EventStateManager::DoDefaultDragStart(
     nsPresContext* aPresContext, WidgetDragEvent* aDragEvent,
     DataTransfer* aDataTransfer, nsIContent* aDragTarget, Selection* aSelection,
-    RemoteDragStartData* aDragStartData, nsIPrincipal* aPrincipal,
-    nsIContentSecurityPolicy* aCsp) {
+    RemoteDragStartData* aDragStartData, nsIPrincipal* aPrincipal) {
   nsCOMPtr<nsIDragService> dragService =
       do_GetService("@mozilla.org/widget/dragservice;1");
   if (!dragService) return false;
 
   // Default handling for the dragstart event.
   //
   // First, check if a drag session already exists. This means that the drag
   // service was called directly within a draggesture handler. In this case,
@@ -2072,26 +2064,26 @@ bool EventStateManager::DoDefaultDragSta
       NS_NewDOMDragEvent(dragTarget, aPresContext, aDragEvent);
 
   // Use InvokeDragSessionWithSelection if a selection is being dragged,
   // such that the image can be generated from the selected text. However,
   // use InvokeDragSessionWithImage if a custom image was set or something
   // other than a selection is being dragged.
   if (!dragImage && aSelection) {
     dragService->InvokeDragSessionWithSelection(
-        aSelection, aPrincipal, aCsp, transArray, action, event, dataTransfer);
+        aSelection, aPrincipal, transArray, action, event, dataTransfer);
   } else if (aDragStartData) {
     MOZ_ASSERT(XRE_IsParentProcess());
     dragService->InvokeDragSessionWithRemoteImage(
-        dragTarget, aPrincipal, aCsp, transArray, action, aDragStartData, event,
+        dragTarget, aPrincipal, transArray, action, aDragStartData, event,
         dataTransfer);
   } else {
-    dragService->InvokeDragSessionWithImage(
-        dragTarget, aPrincipal, aCsp, transArray, action, dragImage, imageX,
-        imageY, event, dataTransfer);
+    dragService->InvokeDragSessionWithImage(dragTarget, aPrincipal, transArray,
+                                            action, dragImage, imageX, imageY,
+                                            event, dataTransfer);
   }
 
   return true;
 }
 
 nsresult EventStateManager::GetContentViewer(nsIContentViewer** aCv) {
   *aCv = nullptr;
 
--- a/dom/events/EventStateManager.h
+++ b/dom/events/EventStateManager.h
@@ -1077,17 +1077,17 @@ class EventStateManager : public nsSuppo
    * aTargetNode - [out] the draggable node, or null if there isn't one
    * aPrincipal - [out] set to the triggering principal of the drag, or null
    *                    if it's from browser chrome or OS
    */
   void DetermineDragTargetAndDefaultData(
       nsPIDOMWindowOuter* aWindow, nsIContent* aSelectionTarget,
       dom::DataTransfer* aDataTransfer, dom::Selection** aSelection,
       dom::RemoteDragStartData** aRemoteDragStartData, nsIContent** aTargetNode,
-      nsIPrincipal** aPrincipal, nsIContentSecurityPolicy** aCsp);
+      nsIPrincipal** aPrincipal);
 
   /*
    * Perform the default handling for the dragstart event and set up a
    * drag for aDataTransfer if it contains any data. Returns true if a drag has
    * started.
    *
    * aDragEvent - the dragstart event
    * aDataTransfer - the data transfer that holds the data to be dragged
@@ -1098,18 +1098,17 @@ class EventStateManager : public nsSuppo
    *              browser chrome or OS
    */
   MOZ_CAN_RUN_SCRIPT
   bool DoDefaultDragStart(nsPresContext* aPresContext,
                           WidgetDragEvent* aDragEvent,
                           dom::DataTransfer* aDataTransfer,
                           nsIContent* aDragTarget, dom::Selection* aSelection,
                           dom::RemoteDragStartData* aDragStartData,
-                          nsIPrincipal* aPrincipal,
-                          nsIContentSecurityPolicy* aCsp);
+                          nsIPrincipal* aPrincipal);
 
   bool IsTrackingDragGesture() const { return mGestureDownContent != nullptr; }
   /**
    * Set the fields of aEvent to reflect the mouse position and modifier keys
    * that were set when the user first pressed the mouse button (stored by
    * BeginTrackingDragGesture). aEvent->mWidget must be
    * mCurrentTarget->GetNearestWidget().
    */
--- a/dom/events/RemoteDragStartData.cpp
+++ b/dom/events/RemoteDragStartData.cpp
@@ -14,29 +14,25 @@ using namespace mozilla::ipc;
 
 namespace mozilla {
 namespace dom {
 
 RemoteDragStartData::~RemoteDragStartData() {}
 
 RemoteDragStartData::RemoteDragStartData(
     BrowserParent* aBrowserParent, nsTArray<IPCDataTransfer>&& aDataTransfer,
-    const LayoutDeviceIntRect& aRect, nsIPrincipal* aPrincipal,
-    nsIContentSecurityPolicy* aCsp)
+    const LayoutDeviceIntRect& aRect, nsIPrincipal* aPrincipal)
     : mBrowserParent(aBrowserParent),
       mDataTransfer(aDataTransfer),
       mRect(aRect),
-      mPrincipal(aPrincipal),
-      mCsp(aCsp) {}
+      mPrincipal(aPrincipal) {}
 
 void RemoteDragStartData::AddInitialDnDDataTo(DataTransfer* aDataTransfer,
-                                              nsIPrincipal** aPrincipal,
-                                              nsIContentSecurityPolicy** aCsp) {
+                                              nsIPrincipal** aPrincipal) {
   NS_IF_ADDREF(*aPrincipal = mPrincipal);
-  NS_IF_ADDREF(*aCsp = mCsp);
 
   for (uint32_t i = 0; i < mDataTransfer.Length(); ++i) {
     nsTArray<IPCDataTransferItem>& itemArray = mDataTransfer[i].items();
     for (auto& item : itemArray) {
       RefPtr<nsVariantCC> variant = new nsVariantCC();
       // Special case kFilePromiseMime so that we get the right
       // nsIFlavorDataProvider for it.
       if (item.flavor().EqualsLiteral(kFilePromiseMime)) {
--- a/dom/events/RemoteDragStartData.h
+++ b/dom/events/RemoteDragStartData.h
@@ -22,42 +22,40 @@ class BrowserParent;
  */
 class RemoteDragStartData {
  public:
   NS_INLINE_DECL_REFCOUNTING(RemoteDragStartData)
 
   RemoteDragStartData(BrowserParent* aBrowserParent,
                       nsTArray<IPCDataTransfer>&& aDataTransfer,
                       const LayoutDeviceIntRect& aRect,
-                      nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp);
+                      nsIPrincipal* aPrincipal);
 
   void SetVisualization(
       already_AddRefed<gfx::DataSourceSurface> aVisualization) {
     mVisualization = aVisualization;
   }
 
   // Get the drag image and rectangle, clearing it from this
   // RemoteDragStartData in the process.
   already_AddRefed<mozilla::gfx::SourceSurface> TakeVisualization(
       LayoutDeviceIntRect* aRect) {
     *aRect = mRect;
     return mVisualization.forget();
   }
 
   void AddInitialDnDDataTo(DataTransfer* aDataTransfer,
-                           nsIPrincipal** aPrincipal,
-                           nsIContentSecurityPolicy** aCsp);
+                           nsIPrincipal** aPrincipal);
 
  private:
   virtual ~RemoteDragStartData();
 
   RefPtr<BrowserParent> mBrowserParent;
   nsTArray<IPCDataTransfer> mDataTransfer;
   const LayoutDeviceIntRect mRect;
   nsCOMPtr<nsIPrincipal> mPrincipal;
-  nsCOMPtr<nsIContentSecurityPolicy> mCsp;
   RefPtr<mozilla::gfx::SourceSurface> mVisualization;
 };
 
 }  // namespace dom
 }  // namespace mozilla
 
 #endif  // mozilla_dom_RemoteDragStartData_h
--- a/dom/ipc/BrowserChild.cpp
+++ b/dom/ipc/BrowserChild.cpp
@@ -1857,26 +1857,24 @@ mozilla::ipc::IPCResult BrowserChild::Re
 mozilla::ipc::IPCResult BrowserChild::RecvNormalPriorityRealTouchMoveEvent(
     const WidgetTouchEvent& aEvent, const ScrollableLayerGuid& aGuid,
     const uint64_t& aInputBlockId, const nsEventStatus& aApzResponse) {
   return RecvRealTouchMoveEvent(aEvent, aGuid, aInputBlockId, aApzResponse);
 }
 
 mozilla::ipc::IPCResult BrowserChild::RecvRealDragEvent(
     const WidgetDragEvent& aEvent, const uint32_t& aDragAction,
-    const uint32_t& aDropEffect, nsIPrincipal* aPrincipal,
-    nsIContentSecurityPolicy* aCsp) {
+    const uint32_t& aDropEffect, nsIPrincipal* aPrincipal) {
   WidgetDragEvent localEvent(aEvent);
   localEvent.mWidget = mPuppetWidget;
 
   nsCOMPtr<nsIDragSession> dragSession = nsContentUtils::GetDragSession();
   if (dragSession) {
     dragSession->SetDragAction(aDragAction);
     dragSession->SetTriggeringPrincipal(aPrincipal);
-    dragSession->SetCsp(aCsp);
     RefPtr<DataTransfer> initialDataTransfer = dragSession->GetDataTransfer();
     if (initialDataTransfer) {
       initialDataTransfer->SetDropEffectInt(aDropEffect);
     }
   }
 
   if (aEvent.mMessage == eDrop) {
     bool canDrop = true;
--- a/dom/ipc/BrowserChild.h
+++ b/dom/ipc/BrowserChild.h
@@ -319,18 +319,17 @@ class BrowserChild final : public nsMess
   mozilla::ipc::IPCResult RecvNormalPriorityRealMouseButtonEvent(
       const mozilla::WidgetMouseEvent& aEvent, const ScrollableLayerGuid& aGuid,
       const uint64_t& aInputBlockId);
 
   MOZ_CAN_RUN_SCRIPT_BOUNDARY
   mozilla::ipc::IPCResult RecvRealDragEvent(const WidgetDragEvent& aEvent,
                                             const uint32_t& aDragAction,
                                             const uint32_t& aDropEffect,
-                                            nsIPrincipal* aPrincipal,
-                                            nsIContentSecurityPolicy* aCsp);
+                                            nsIPrincipal* aPrincipal);
 
   mozilla::ipc::IPCResult RecvRealKeyEvent(
       const mozilla::WidgetKeyboardEvent& aEvent);
 
   mozilla::ipc::IPCResult RecvNormalPriorityRealKeyEvent(
       const mozilla::WidgetKeyboardEvent& aEvent);
 
   mozilla::ipc::IPCResult RecvMouseWheelEvent(
--- a/dom/ipc/BrowserParent.cpp
+++ b/dom/ipc/BrowserParent.cpp
@@ -1432,30 +1432,29 @@ bool BrowserParent::QueryDropLinksForVer
     return false;
   }
   return true;
 }
 
 void BrowserParent::SendRealDragEvent(WidgetDragEvent& aEvent,
                                       uint32_t aDragAction,
                                       uint32_t aDropEffect,
-                                      nsIPrincipal* aPrincipal,
-                                      nsIContentSecurityPolicy* aCsp) {
+                                      nsIPrincipal* aPrincipal) {
   if (mIsDestroyed || !mIsReadyToHandleInputEvents) {
     return;
   }
   MOZ_ASSERT(!Manager()->IsInputPriorityEventEnabled());
   aEvent.mRefPoint = TransformParentToChild(aEvent.mRefPoint);
   if (aEvent.mMessage == eDrop) {
     if (!QueryDropLinksForVerification()) {
       return;
     }
   }
   DebugOnly<bool> ret = PBrowserParent::SendRealDragEvent(
-      aEvent, aDragAction, aDropEffect, aPrincipal, aCsp);
+      aEvent, aDragAction, aDropEffect, aPrincipal);
   NS_WARNING_ASSERTION(ret, "PBrowserParent::SendRealDragEvent() failed");
   MOZ_ASSERT(!ret || aEvent.HasBeenPostedToRemoteProcess());
 }
 
 void BrowserParent::SendMouseWheelEvent(WidgetWheelEvent& aEvent) {
   if (mIsDestroyed || !mIsReadyToHandleInputEvents) {
     return;
   }
@@ -3608,29 +3607,29 @@ mozilla::ipc::IPCResult BrowserParent::R
   }
   return IPC_OK();
 }
 
 mozilla::ipc::IPCResult BrowserParent::RecvInvokeDragSession(
     nsTArray<IPCDataTransfer>&& aTransfers, const uint32_t& aAction,
     Maybe<Shmem>&& aVisualDnDData, const uint32_t& aStride,
     const gfx::SurfaceFormat& aFormat, const LayoutDeviceIntRect& aDragRect,
-    nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp) {
+    nsIPrincipal* aPrincipal) {
   PresShell* presShell = mFrameElement->OwnerDoc()->GetPresShell();
   if (!presShell) {
     Unused << Manager()->SendEndDragSession(true, true, LayoutDeviceIntPoint(),
                                             0);
     // Continue sending input events with input priority when stopping the dnd
     // session.
     Manager()->SetInputPriorityEventEnabled(true);
     return IPC_OK();
   }
 
   RefPtr<RemoteDragStartData> dragStartData = new RemoteDragStartData(
-      this, std::move(aTransfers), aDragRect, aPrincipal, aCsp);
+      this, std::move(aTransfers), aDragRect, aPrincipal);
 
   if (!aVisualDnDData.isNothing() && aVisualDnDData.ref().IsReadable() &&
       aVisualDnDData.ref().Size<char>() >= aDragRect.height * aStride) {
     dragStartData->SetVisualization(gfx::CreateDataSourceSurfaceFromData(
         gfx::IntSize(aDragRect.width, aDragRect.height), aFormat,
         aVisualDnDData.ref().get<uint8_t>(), aStride));
   }
 
--- a/dom/ipc/BrowserParent.h
+++ b/dom/ipc/BrowserParent.h
@@ -566,18 +566,17 @@ class BrowserParent final : public PBrow
   /**
    * The following Send*Event() marks aEvent as posted to remote process if
    * it succeeded.  So, you can check the result with
    * aEvent.HasBeenPostedToRemoteProcess().
    */
   void SendRealMouseEvent(WidgetMouseEvent& aEvent);
 
   void SendRealDragEvent(WidgetDragEvent& aEvent, uint32_t aDragAction,
-                         uint32_t aDropEffect, nsIPrincipal* aPrincipal,
-                         nsIContentSecurityPolicy* aCsp);
+                         uint32_t aDropEffect, nsIPrincipal* aPrincipal);
 
   void SendMouseWheelEvent(WidgetWheelEvent& aEvent);
 
   void SendRealKeyEvent(WidgetKeyboardEvent& aEvent);
 
   void SendRealTouchEvent(WidgetTouchEvent& aEvent);
 
   void SendPluginEvent(WidgetPluginEvent& aEvent);
@@ -677,17 +676,17 @@ class BrowserParent final : public PBrow
                             const bool& aRunInGlobalScope);
 
   void LayerTreeUpdate(const LayersObserverEpoch& aEpoch, bool aActive);
 
   mozilla::ipc::IPCResult RecvInvokeDragSession(
       nsTArray<IPCDataTransfer>&& aTransfers, const uint32_t& aAction,
       Maybe<Shmem>&& aVisualDnDData, const uint32_t& aStride,
       const gfx::SurfaceFormat& aFormat, const LayoutDeviceIntRect& aDragRect,
-      nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp);
+      nsIPrincipal* aPrincipal);
 
   void AddInitialDnDDataTo(DataTransfer* aDataTransfer,
                            nsIPrincipal** aPrincipal);
 
   bool TakeDragVisualization(RefPtr<mozilla::gfx::SourceSurface>& aSurface,
                              LayoutDeviceIntRect* aDragRect);
 
   mozilla::ipc::IPCResult RecvEnsureLayersConnected(
--- a/dom/ipc/PBrowser.ipdl
+++ b/dom/ipc/PBrowser.ipdl
@@ -659,17 +659,17 @@ parent:
     nested(inside_sync) sync DispatchWheelEvent(WidgetWheelEvent event);
     nested(inside_sync) sync DispatchMouseEvent(WidgetMouseEvent event);
     nested(inside_sync) sync DispatchKeyboardEvent(WidgetKeyboardEvent event);
 
     async InvokeDragSession(IPCDataTransfer[] transfers, uint32_t action,
                             Shmem? visualData,
                             uint32_t stride, SurfaceFormat format,
                             LayoutDeviceIntRect dragRect,
-                            nsIPrincipal principal, nsIContentSecurityPolicy csp);
+                            nsIPrincipal principal);
 
     // After a compositor reset, it is necessary to reconnect each layers ID to
     // the compositor of the widget that will render those layers. Note that
     // this is sync so we can ensure that messages to the window compositor
     // arrive before the BrowserChild attempts to use its cross-process compositor
     // bridge.
     sync EnsureLayersConnected() returns (CompositorOptions compositorOptions);
 
@@ -818,18 +818,17 @@ child:
                                            uint64_t aInputBlockId,
                                            nsEventStatus aApzResponse);
 
     /*
      * We disable the input event queue when there is an active dnd session. We
      * don't need support RealDragEvent with input priority.
      */
     async RealDragEvent(WidgetDragEvent aEvent, uint32_t aDragAction,
-                        uint32_t aDropEffect, nsIPrincipal aPrincipal,
-                        nsIContentSecurityPolicy csp);
+                        uint32_t aDropEffect, nsIPrincipal aPrincipal);
 
     async PluginEvent(WidgetPluginEvent aEvent);
 
     prio(input) async CompositionEvent(WidgetCompositionEvent event);
     async NormalPriorityCompositionEvent(WidgetCompositionEvent event);
 
     prio(input) async SelectionEvent(WidgetSelectionEvent event);
     async NormalPrioritySelectionEvent(WidgetSelectionEvent event);
--- a/dom/webidl/DataTransfer.webidl
+++ b/dom/webidl/DataTransfer.webidl
@@ -1,17 +1,16 @@
 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/.
  *
  * The origin of this IDL file is:
  * http://www.whatwg.org/specs/web-apps/current-work/#the-datatransfer-interface
  */
-interface ContentSecurityPolicy;
 
 [Constructor]
 interface DataTransfer {
            attribute DOMString dropEffect;
            attribute DOMString effectAllowed;
 
   readonly attribute DataTransferItemList items;
 
@@ -160,19 +159,16 @@ partial interface DataTransfer {
   /**
    * The URI spec of the triggering principal.  This may be different than
    * sourceNode's principal when sourceNode is xul:browser and the drag is
    * triggered in a browsing context inside it.
    */
   [ChromeOnly]
   readonly attribute DOMString mozTriggeringPrincipalURISpec;
 
-  [ChromeOnly] 
-  readonly attribute ContentSecurityPolicy? mozCSP;
-
   /**
    * Copy the given DataTransfer for the given event. Used by testing code for
    * creating emulated Drag and Drop events in the UI.
    *
    * NOTE: Don't expose a DataTransfer produced with this method to the web or
    * use this for non-testing purposes. It can easily be used to get the
    * DataTransfer into an invalid state, and is an unstable implementation
    * detail of EventUtils.synthesizeDrag.
--- a/widget/nsBaseDragService.cpp
+++ b/widget/nsBaseDragService.cpp
@@ -157,28 +157,16 @@ nsBaseDragService::GetTriggeringPrincipa
 }
 
 NS_IMETHODIMP
 nsBaseDragService::SetTriggeringPrincipal(nsIPrincipal* aPrincipal) {
   mTriggeringPrincipal = aPrincipal;
   return NS_OK;
 }
 
-NS_IMETHODIMP
-nsBaseDragService::GetCsp(nsIContentSecurityPolicy** aCsp) {
-  NS_IF_ADDREF(*aCsp = mCsp);
-  return NS_OK;
-}
-
-NS_IMETHODIMP
-nsBaseDragService::SetCsp(nsIContentSecurityPolicy* aCsp) {
-  mCsp = aCsp;
-  return NS_OK;
-}
-
 //-------------------------------------------------------------------------
 
 NS_IMETHODIMP
 nsBaseDragService::GetData(nsITransferable* aTransferable,
                            uint32_t aItemIndex) {
   return NS_ERROR_FAILURE;
 }
 
@@ -207,18 +195,18 @@ DataTransfer* nsBaseDragService::GetData
 
 void nsBaseDragService::SetDataTransfer(DataTransfer* aDataTransfer) {
   mDataTransfer = aDataTransfer;
 }
 
 //-------------------------------------------------------------------------
 NS_IMETHODIMP
 nsBaseDragService::InvokeDragSession(
-    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp,
-    nsIArray* aTransferableArray, uint32_t aActionType,
+    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIArray* aTransferableArray,
+    uint32_t aActionType,
     nsContentPolicyType aContentPolicyType = nsIContentPolicy::TYPE_OTHER) {
   AUTO_PROFILER_LABEL("nsBaseDragService::InvokeDragSession", OTHER);
 
   // If you're hitting this, a test is causing the browser to attempt to enter
   // the drag-drop native nested event loop, which will put the browser in a
   // state that won't run tests properly until there's manual intervention
   // to exit the drag-drop loop (either by moving the mouse or hitting escape),
   // which can't be done from script since we're in the nested loop.
@@ -235,17 +223,16 @@ nsBaseDragService::InvokeDragSession(
   }
 
   NS_ENSURE_TRUE(aDOMNode, NS_ERROR_INVALID_ARG);
   NS_ENSURE_TRUE(mSuppressLevel == 0, NS_ERROR_FAILURE);
 
   // stash the document of the dom node
   mSourceDocument = aDOMNode->OwnerDoc();
   mTriggeringPrincipal = aPrincipal;
-  mCsp = aCsp;
   mSourceNode = aDOMNode;
   mContentPolicyType = aContentPolicyType;
   mEndDragPoint = LayoutDeviceIntPoint(0, 0);
 
   // When the mouse goes down, the selection code starts a mouse
   // capture. However, this gets in the way of determining drag
   // feedback for things like trees because the event coordinates
   // are in the wrong coord system, so turn off mouse capture.
@@ -271,20 +258,19 @@ nsBaseDragService::InvokeDragSession(
     EndDragSession(true, 0);
   }
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsBaseDragService::InvokeDragSessionWithImage(
-    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp,
-    nsIArray* aTransferableArray, uint32_t aActionType, nsINode* aImage,
-    int32_t aImageX, int32_t aImageY, DragEvent* aDragEvent,
-    DataTransfer* aDataTransfer) {
+    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIArray* aTransferableArray,
+    uint32_t aActionType, nsINode* aImage, int32_t aImageX, int32_t aImageY,
+    DragEvent* aDragEvent, DataTransfer* aDataTransfer) {
   NS_ENSURE_TRUE(aDragEvent, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(aDataTransfer, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(mSuppressLevel == 0, NS_ERROR_FAILURE);
 
   mDataTransfer = aDataTransfer;
   mSelection = nullptr;
   mHasImage = true;
   mDragPopup = nullptr;
@@ -311,28 +297,27 @@ nsBaseDragService::InvokeDragSessionWith
       if (treeBody) {
         mRegion = treeBody->GetSelectionRegion();
       }
     }
   }
 #endif
 
   nsresult rv =
-      InvokeDragSession(aDOMNode, aPrincipal, aCsp, aTransferableArray,
-                        aActionType, nsIContentPolicy::TYPE_INTERNAL_IMAGE);
+      InvokeDragSession(aDOMNode, aPrincipal, aTransferableArray, aActionType,
+                        nsIContentPolicy::TYPE_INTERNAL_IMAGE);
   mRegion = Nothing();
   return rv;
 }
 
 NS_IMETHODIMP
 nsBaseDragService::InvokeDragSessionWithRemoteImage(
-    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIContentSecurityPolicy* aCsp,
-    nsIArray* aTransferableArray, uint32_t aActionType,
-    RemoteDragStartData* aDragStartData, DragEvent* aDragEvent,
-    DataTransfer* aDataTransfer) {
+    nsINode* aDOMNode, nsIPrincipal* aPrincipal, nsIArray* aTransferableArray,
+    uint32_t aActionType, RemoteDragStartData* aDragStartData,
+    DragEvent* aDragEvent, DataTransfer* aDataTransfer) {
   NS_ENSURE_TRUE(aDragEvent, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(aDataTransfer, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(mSuppressLevel == 0, NS_ERROR_FAILURE);
 
   mDataTransfer = aDataTransfer;
   mSelection = nullptr;
   mHasImage = true;
   mDragPopup = nullptr;
@@ -340,27 +325,29 @@ nsBaseDragService::InvokeDragSessionWith
   mDragStartData = aDragStartData;
   mImageOffset = CSSIntPoint(0, 0);
 
   mScreenPosition.x = aDragEvent->ScreenX(CallerType::System);
   mScreenPosition.y = aDragEvent->ScreenY(CallerType::System);
   mInputSource = aDragEvent->MozInputSource();
 
   nsresult rv =
-      InvokeDragSession(aDOMNode, aPrincipal, aCsp, aTransferableArray,
-                        aActionType, nsIContentPolicy::TYPE_INTERNAL_IMAGE);
+      InvokeDragSession(aDOMNode, aPrincipal, aTransferableArray, aActionType,
+                        nsIContentPolicy::TYPE_INTERNAL_IMAGE);
   mRegion = Nothing();
   return rv;
 }
 
 NS_IMETHODIMP
-nsBaseDragService::InvokeDragSessionWithSelection(
-    Selection* aSelection, nsIPrincipal* aPrincipal,
-    nsIContentSecurityPolicy* aCsp, nsIArray* aTransferableArray,
-    uint32_t aActionType, DragEvent* aDragEvent, DataTransfer* aDataTransfer) {
+nsBaseDragService::InvokeDragSessionWithSelection(Selection* aSelection,
+                                                  nsIPrincipal* aPrincipal,
+                                                  nsIArray* aTransferableArray,
+                                                  uint32_t aActionType,
+                                                  DragEvent* aDragEvent,
+                                                  DataTransfer* aDataTransfer) {
   NS_ENSURE_TRUE(aSelection, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(aDragEvent, NS_ERROR_NULL_POINTER);
   NS_ENSURE_TRUE(mSuppressLevel == 0, NS_ERROR_FAILURE);
 
   mDataTransfer = aDataTransfer;
   mSelection = aSelection;
   mHasImage = true;
   mDragPopup = nullptr;
@@ -373,18 +360,18 @@ nsBaseDragService::InvokeDragSessionWith
   mScreenPosition.y = aDragEvent->ScreenY(CallerType::System);
   mInputSource = aDragEvent->MozInputSource();
 
   // just get the focused node from the selection
   // XXXndeakin this should actually be the deepest node that contains both
   // endpoints of the selection
   nsCOMPtr<nsINode> node = aSelection->GetFocusNode();
 
-  return InvokeDragSession(node, aPrincipal, aCsp, aTransferableArray,
-                           aActionType, nsIContentPolicy::TYPE_OTHER);
+  return InvokeDragSession(node, aPrincipal, aTransferableArray, aActionType,
+                           nsIContentPolicy::TYPE_OTHER);
 }
 
 //-------------------------------------------------------------------------
 NS_IMETHODIMP
 nsBaseDragService::GetCurrentSession(nsIDragSession** aSession) {
   if (!aSession) return NS_ERROR_INVALID_ARG;
 
   // "this" also implements a drag session, so say we are one but only
@@ -470,17 +457,16 @@ nsBaseDragService::EndDragSession(bool a
 
   mDoingDrag = false;
   mCanDrop = false;
 
   // release the source we've been holding on to.
   mSourceDocument = nullptr;
   mSourceNode = nullptr;
   mTriggeringPrincipal = nullptr;
-  mCsp = nullptr;
   mSelection = nullptr;
   mDataTransfer = nullptr;
   mHasImage = false;
   mUserCancelled = false;
   mDragPopup = nullptr;
   mDragStartData = nullptr;
   mImage = nullptr;
   mImageOffset = CSSIntPoint();
--- a/widget/nsBaseDragService.h
+++ b/widget/nsBaseDragService.h
@@ -156,17 +156,16 @@ class nsBaseDragService : public nsIDrag
 
   bool mDragEventDispatchedToChildProcess;
 
   uint32_t mDragAction;
   uint32_t mDragActionFromChildProcess;
 
   nsCOMPtr<nsINode> mSourceNode;
   nsCOMPtr<nsIPrincipal> mTriggeringPrincipal;
-  nsCOMPtr<nsIContentSecurityPolicy> mCsp;
 
   // the document at the drag source. will be null if it came from outside the
   // app.
   RefPtr<mozilla::dom::Document> mSourceDocument;
 
   // the contentpolicy type passed to the channel when initiating the drag
   // session
   nsContentPolicyType mContentPolicyType;
--- a/widget/nsDragServiceProxy.cpp
+++ b/widget/nsDragServiceProxy.cpp
@@ -36,21 +36,16 @@ nsresult nsDragServiceProxy::InvokeDragS
   nsContentUtils::TransferablesToIPCTransferables(
       aArrayTransferables, dataTransfers, false, child->Manager(), nullptr);
 
   nsCOMPtr<nsIPrincipal> principal;
   if (mSourceNode) {
     principal = mSourceNode->NodePrincipal();
   }
 
-  nsCOMPtr<nsIContentSecurityPolicy> csp;
-  if (mSourceDocument) {
-    csp = mSourceDocument->GetCsp();
-  }
-
   LayoutDeviceIntRect dragRect;
   if (mHasImage || mSelection) {
     nsPresContext* pc;
     RefPtr<SourceSurface> surface;
     DrawDrag(mSourceNode, aRegion, mScreenPosition, &dragRect, &surface, &pc);
 
     if (surface) {
       RefPtr<DataSourceSurface> dataSurface = surface->GetDataSurface();
@@ -68,21 +63,21 @@ nsresult nsDragServiceProxy::InvokeDragS
         // Save the surface data to shared memory.
         if (!surfaceData.IsReadable() || !surfaceData.get<char>()) {
           NS_WARNING("Failed to create shared memory for drag session.");
           return NS_ERROR_FAILURE;
         }
 
         mozilla::Unused << child->SendInvokeDragSession(
             dataTransfers, aActionType, Some(std::move(surfaceData)), stride,
-            dataSurface->GetFormat(), dragRect, IPC::Principal(principal), csp);
+            dataSurface->GetFormat(), dragRect, IPC::Principal(principal));
         StartDragSession();
         return NS_OK;
       }
     }
   }
 
   mozilla::Unused << child->SendInvokeDragSession(
       dataTransfers, aActionType, Nothing(), 0, static_cast<SurfaceFormat>(0),
-      dragRect, IPC::Principal(principal), csp);
+      dragRect, IPC::Principal(principal));
   StartDragSession();
   return NS_OK;
 }
--- a/widget/nsIDragService.idl
+++ b/widget/nsIDragService.idl
@@ -41,27 +41,25 @@ interface nsIDragService : nsISupports
 
   /**
     * Starts a modal drag session with an array of transaferables.
     *
     * Note: This method is deprecated for non-native code.
     *
     * @param  aPrincipal - the triggering principal of the drag, or null if
     *                      it's from browser chrome or OS
-    * @param aCsp - The csp of the triggering Document
     * @param  aTransferables - an array of transferables to be dragged
     * @param  aActionType - specified which of copy/move/link are allowed
     * @param  aContentPolicyType - the contentPolicyType that will be
     *           passed to the loadInfo when creating a new channel
     *           (defaults to TYPE_OTHER)
     */
   [can_run_script]
   void invokeDragSession (in Node aDOMNode,
                           in nsIPrincipal aPrincipal,
-                          in nsIContentSecurityPolicy aCsp,
                           in nsIArray aTransferables,
                           in unsigned long aActionType,
                           [optional] in nsContentPolicyType aContentPolicyType);
 
   /**
    * Starts a modal drag session using an image. The first four arguments are
    * the same as invokeDragSession.
    *
@@ -86,49 +84,46 @@ interface nsIDragService : nsISupports
    * displayed. The document selection is hidden while drawing.
    *
    * The aDragEvent must be supplied as the current screen coordinates of the
    * event are needed to calculate the image location.
    */
   [noscript, can_run_script]
   void invokeDragSessionWithImage(in Node aDOMNode,
                                   in nsIPrincipal aPrincipal,
-                                  in nsIContentSecurityPolicy aCsp,
                                   in nsIArray aTransferableArray,
                                   in unsigned long aActionType,
                                   in Node aImage,
                                   in long aImageX,
                                   in long aImageY,
                                   in DragEvent aDragEvent,
                                   in DataTransferPtr aDataTransfer);
 
   /** Start a drag session with the data in aDragStartData from a child process.
    *  Other arguments are the same as invokeDragSessionWithImage.
    */
   [noscript, can_run_script]
   void invokeDragSessionWithRemoteImage(in Node aDOMNode,
                                         in nsIPrincipal aPrincipal,
-                                        in nsIContentSecurityPolicy aCsp,
                                         in nsIArray aTransferableArray,
                                         in unsigned long aActionType,
                                         in RemoteDragStartDataPtr aDragStartData,
                                         in DragEvent aDragEvent,
                                         in DataTransferPtr aDataTransfer);
 
   /**
    * Start a modal drag session using the selection as the drag image.
    * The aDragEvent must be supplied as the current screen coordinates of the
    * event are needed to calculate the image location.
    *
    * Note: This method is deprecated for non-native code.
    */
   [can_run_script]
   void invokeDragSessionWithSelection(in Selection aSelection,
                                       in nsIPrincipal aPrincipal,
-                                      in nsIContentSecurityPolicy aCsp,
                                       in nsIArray aTransferableArray,
                                       in unsigned long aActionType,
                                       in DragEvent aDragEvent,
                                       in DataTransferPtr aDataTransfer);
 
   /**
     * Returns the current Drag Session
     */
--- a/widget/nsIDragSession.idl
+++ b/widget/nsIDragSession.idl
@@ -3,21 +3,19 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "nsISupports.idl"
 #include "nsITransferable.idl"
 
 
-
 %{ C++
 #include "nsSize.h"
 %}
-interface nsIContentSecurityPolicy;
 
 native nsSize (nsSize);
 
 webidl DataTransfer;
 webidl Document;
 webidl Node;
 
 [scriptable, builtinclass, uuid(25bce737-73f0-43c7-bc20-c71044a73c5a)]
@@ -60,23 +58,16 @@ interface nsIDragSession : nsISupports
   /**
    * the triggering principal.  This may be different than sourceNode's
    * principal when sourceNode is xul:browser and the drag is
    * triggered in a browsing context inside it.
    */
   attribute nsIPrincipal triggeringPrincipal;
 
   /**
-   * the triggering csp.  This may be different than sourceNode's
-   * csp when sourceNode is xul:browser and the drag is
-   * triggered in a browsing context inside it.
-   */
-  attribute nsIContentSecurityPolicy csp; 
-
-  /**
    * The data transfer object for the current drag.
    */
   [binaryname(DataTransferXPCOM)]
   attribute DataTransfer dataTransfer;
   [notxpcom, nostdcall] DataTransfer getDataTransfer();
   [notxpcom, nostdcall] void setDataTransfer(in DataTransfer aDataTransfer);
 
   /**