Bug 1399429 - Properly determine if the content window is private for the contextMenu. r? draft
authorIan Moody <moz-ian@perix.co.uk>
Fri, 13 Oct 2017 19:13:35 +0100
changeset 680223 ccaae0f3eed7f1ceff928d7f6df57f1391dc77b2
parent 679629 25aad10380b10b6efa50c2b4d97245f078d870a0
child 735794 b7cc4e69587bb248266287a6a82260c0404a6d5c
push id84430
push usermoz-ian@perix.co.uk
push dateFri, 13 Oct 2017 18:14:09 +0000
bugs1399429
milestone58.0a1
Bug 1399429 - Properly determine if the content window is private for the contextMenu. r? MozReview-Commit-ID: Ipo3Rcs1TZ8
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.isBrowserPrivate(context.target.ownerDocument),
     };
 
     // used for nsContextMenu.initMediaPlayerItems
     Object.assign(cleanTarget, {
       ended: context.target.ended,
       muted: context.target.muted,
       paused: context.target.paused,
       controls: context.target.controls,