Bug 682357 - Don't broadcast context menu commands to all browsers [r=wjohnston]
authorMark Finkle <mfinkle@mozilla.com>
Fri, 26 Aug 2011 17:23:36 -0400
changeset 77275 1651ea142f0c99357a3be62d25d6a23c0c16d010
parent 77274 2da2cc9a885c41fcd28b47fa153f623b9206f0df
child 77276 72e60db43de71a4e4c59d6a0cdbea8c86fe412ec
push id78
push userclegnitto@mozilla.com
push dateFri, 16 Dec 2011 17:32:24 +0000
treeherdermozilla-release@79d24e644fdd [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerswjohnston
bugs682357
milestone9.0a1
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
Bug 682357 - Don't broadcast context menu commands to all browsers [r=wjohnston]
mobile/chrome/content/ContextCommands.js
--- a/mobile/chrome/content/ContextCommands.js
+++ b/mobile/chrome/content/ContextCommands.js
@@ -17,17 +17,17 @@ var ContextCommands = {
 #endif
 
   paste: function cc_paste() {
     let target = ContextHelper.popupState.target;
     if (target.localName == "browser") {
       let x = ContextHelper.popupState.x;
       let y = ContextHelper.popupState.y;
       let json = {x: x, y: y, command: "paste" };
-      messageManager.sendAsyncMessage("Browser:ContextCommand", json);
+      target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
     } else {
       target.editor.paste(Ci.nsIClipboard.kGlobalClipboard);
       target.focus();
     }
   },
 
   pasteAndGo: function cc_pasteAndGo() {
     let target = ContextHelper.popupState.target;
@@ -37,17 +37,17 @@ var ContextCommands = {
   },
 
   selectAll: function cc_selectAll() {
     let target = ContextHelper.popupState.target;
     if (target.localName == "browser") {
       let x = ContextHelper.popupState.x;
       let y = ContextHelper.popupState.y;
       let json = {x: x, y: y, command: "select-all" };
-      messageManager.sendAsyncMessage("Browser:ContextCommand", json);
+      target.messageManager.sendAsyncMessage("Browser:ContextCommand", json);
     } else {
       target.editor.selectAll();
       target.focus();
     }
   },
 
   openInNewTab: function cc_openInNewTab() {
     Browser.addTab(ContextHelper.popupState.linkURL, false, Browser.selectedTab);