Bug 1399429 - Properly determine if the content window is private for the contextMenu. r=Felipe, a=ritu
authorIan Moody <moz-ian@perix.co.uk>
Sat, 14 Oct 2017 16:43:38 +0100
changeset 434982 be62e8e756ba5b95455fbd4f1a11b44bae8e3912
parent 434981 d4e212a2b1e1180c245dd528c39500991de311ad
child 434983 628e941a223c24bb73c6e59e5700ee26234d3df0
push id1567
push userjlorenzo@mozilla.com
push dateThu, 02 Nov 2017 12:36:05 +0000
treeherdermozilla-release@e512c14a0406 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersFelipe, ritu
bugs1399429
milestone57.0
Bug 1399429 - Properly determine if the content window is private for the contextMenu. r=Felipe, a=ritu MozReview-Commit-ID: 7kTt50k5JxM
browser/modules/ContextMenu.jsm
--- a/browser/modules/ContextMenu.jsm
+++ b/browser/modules/ContextMenu.jsm
@@ -654,17 +654,17 @@ class ContextMenu {
       // used for nsContextMenu.initLeaveDOMFullScreenItems and
       // nsContextMenu.initMediaPlayerItems
       fullscreen: context.target.ownerDocument.fullscreen,
 
       // used for nsContextMenu.initMiscItems
       contentType: context.target.ownerDocument.contentType,
 
       // used for nsContextMenu.saveLink
-      isPrivate: context.target.ownerDocument.isPrivate,
+      isPrivate: PrivateBrowsingUtils.isContentWindowPrivate(context.target.ownerGlobal),
     };
 
     // used for nsContextMenu.initMediaPlayerItems
     Object.assign(cleanTarget, {
       ended: context.target.ended,
       muted: context.target.muted,
       paused: context.target.paused,
       controls: context.target.controls,