зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1141186 - Fix context-menu Share commands so they don't use unsafe CPOWs. r=mconley
This commit is contained in:
Родитель
9f640b91b5
Коммит
cfb644046c
|
@ -312,7 +312,7 @@
|
|||
<menuitem id="context-shareselect"
|
||||
label="&shareSelect.label;"
|
||||
accesskey="&shareSelect.accesskey;"
|
||||
oncommand="gContextMenu.shareSelect(getBrowserSelection());"/>
|
||||
oncommand="gContextMenu.shareSelect();"/>
|
||||
<menuseparator id="frame-sep"/>
|
||||
<menu id="frame" label="&thisFrameMenu.label;" accesskey="&thisFrameMenu.accesskey;">
|
||||
<menupopup>
|
||||
|
|
|
@ -658,7 +658,7 @@ SocialShare = {
|
|||
pageData.microdata = msg.data;
|
||||
this.sharePage(providerOrigin, pageData, target);
|
||||
});
|
||||
gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, target);
|
||||
gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, { target });
|
||||
return;
|
||||
}
|
||||
this.currentShare = pageData;
|
||||
|
|
|
@ -1024,7 +1024,7 @@ let PageMetadataMessenger = {
|
|||
}
|
||||
|
||||
case "PageMetadata:GetMicrodata": {
|
||||
let target = message.objects;
|
||||
let target = message.objects.target;
|
||||
let result = PageMetadata.getMicrodata(content.document, target);
|
||||
sendAsyncMessage("PageMetadata:MicrodataResult", result);
|
||||
break;
|
||||
|
|
|
@ -1640,8 +1640,8 @@ nsContextMenu.prototype = {
|
|||
SocialShare.sharePage(null, { url: this.mediaURL, source: this.mediaURL }, this.target);
|
||||
},
|
||||
|
||||
shareSelect: function CM_shareSelect(selection) {
|
||||
SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: selection }, this.target);
|
||||
shareSelect: function CM_shareSelect() {
|
||||
SocialShare.sharePage(null, { url: this.browser.currentURI.spec, text: this.textSelected }, this.target);
|
||||
},
|
||||
|
||||
savePageAs: function CM_savePageAs() {
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
pageData.microdata = msg.data;
|
||||
this.loadPanel(pageData, target);
|
||||
});
|
||||
gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, target);
|
||||
gBrowser.selectedBrowser.messageManager.sendAsyncMessage("PageMetadata:GetMicrodata", null, { target });
|
||||
return;
|
||||
}
|
||||
this.pageData = pageData;
|
||||
|
|
Загрузка…
Ссылка в новой задаче