Bug 1194764. Fix the way we pass the outer window id to various things in context menu code to work in non-e10s mode too. r=jryans a=ritu
authorBoris Zbarsky <bzbarsky@mit.edu>
Thu, 03 Sep 2015 22:42:49 -0400
changeset 289128 75bd2fc8c22acb9ed94c9468693682b1a126be5c
parent 289127 cd745fd4931c919ae85a02d1a4c9b6f85cc6477c
child 289129 ef52c4718d2b394145536b1069bfa39d000ce202
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjryans, ritu
bugs1194764
milestone42.0a2
Bug 1194764. Fix the way we pass the outer window id to various things in context menu code to work in non-e10s mode too. r=jryans a=ritu
browser/base/content/nsContextMenu.js
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1058,17 +1058,17 @@ nsContextMenu.prototype = {
     }
   },
 
   // Open new "view source" window with the frame's URL.
   viewFrameSource: function() {
     BrowserViewSourceOfDocument({
       browser: this.browser,
       URL: gContextMenuContentData.docLocation,
-      outerWindowID: gContextMenuContentData.frameOuterWindowID,
+      outerWindowID: this.frameOuterWindowID,
     });
   },
 
   viewInfo: function() {
     BrowserPageInfo(this.target.ownerDocument.defaultView.top.document);
   },
 
   viewImageInfo: function() {
@@ -1372,17 +1372,17 @@ nsContextMenu.prototype = {
     channel.asyncOpen(new saveAsListener(), null);
   },
 
   // Save URL of clicked-on link.
   saveLink: function() {
     urlSecurityCheck(this.linkURL, this.principal);
     this.saveHelper(this.linkURL, this.linkTextStr, null, true, this.ownerDoc,
                     gContextMenuContentData.documentURIObject,
-                    gContextMenuContentData.frameOuterWindowID,
+                    this.frameOuterWindowID,
                     this.linkDownload);
   },
 
   // Backwards-compatibility wrapper
   saveImage : function() {
     if (this.onCanvas || this.onImage)
         this.saveMedia();
   },
@@ -1403,17 +1403,17 @@ nsContextMenu.prototype = {
       saveImageURL(this.mediaURL, null, "SaveImageTitle", false,
                    false, referrerURI, doc, gContextMenuContentData.contentType,
                    gContextMenuContentData.contentDisposition);
     }
     else if (this.onVideo || this.onAudio) {
       urlSecurityCheck(this.mediaURL, this.principal);
       var dialogTitle = this.onVideo ? "SaveVideoTitle" : "SaveAudioTitle";
       this.saveHelper(this.mediaURL, null, dialogTitle, false, doc, referrerURI,
-                      gContextMenuContentData.frameOuterWindowID, "");
+                      this.frameOuterWindowID, "");
     }
   },
 
   // Backwards-compatibility wrapper
   sendImage : function() {
     if (this.onCanvas || this.onImage)
         this.sendMedia();
   },