Skip to content

Commit

Permalink
Use fake gContextMenuContentData only in multi-process mode
Browse files Browse the repository at this point in the history
(related to #20)
  • Loading branch information
Infocatcher committed Mar 14, 2016
1 parent a6545cd commit e832d3c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions chrome/content/linkPropsPlus.js
Original file line number Diff line number Diff line change
Expand Up @@ -797,9 +797,8 @@ var linkPropsPlusSvc = {
// Note: tricks around new nsContextMenu().saveLink() doesn't work with enabled e10s
var content = this.sourceWindow || browserWin.content;
var contentDoc = content.document;
var linkDoc = "gMultiProcessBrowser" in browserWin && browserWin.gMultiProcessBrowser
? browserDoc
: contentDoc;
var isMultiProcess = "gMultiProcessBrowser" in browserWin && browserWin.gMultiProcessBrowser;
var linkDoc = isMultiProcess ? browserDoc : contentDoc;
var link = linkDoc.createElementNS("http://www.w3.org/1999/xhtml", "a");
link.href = uri;
var fakeDoc = {
Expand All @@ -816,7 +815,8 @@ var linkPropsPlusSvc = {
return fakeDoc;
});
if(
"gContextMenuContentData" in browserWin
isMultiProcess
&& "gContextMenuContentData" in browserWin
&& !browserWin.gContextMenuContentData
) { // Hack for Firefox 40+
browserWin.gContextMenuContentData = {
Expand Down

0 comments on commit e832d3c

Please sign in to comment.