mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 09:05:45 +00:00
Get postData from session history instead of BrowserInstance. bug=46200, r=law, sr=alecf
This commit is contained in:
parent
80a1014ec9
commit
fe901e84cd
@ -85,11 +85,14 @@
|
||||
// Default is to save current page.
|
||||
if ( !url )
|
||||
url = window._content.location.href;
|
||||
// Post data comes from appcore.
|
||||
|
||||
try {
|
||||
postData = window.appCore.postData;
|
||||
var sessionHistory = getWebNavigation().sessionHistory;
|
||||
var entry = sessionHistory.getEntryAtIndex(sessionHistory.index, false);
|
||||
postData = entry.postData;
|
||||
} catch(e) {
|
||||
}
|
||||
|
||||
// Use stream xfer component to prompt for destination and save.
|
||||
var xfer = Components.classes["@mozilla.org/appshell/component/xfer;1"].getService(Components.interfaces["nsIStreamTransfer"]);
|
||||
try {
|
||||
|
@ -672,11 +672,15 @@ nsContextMenu.prototype = {
|
||||
// Default is to save current page.
|
||||
if ( !url ) {
|
||||
url = window._content.location.href;
|
||||
// Post data comes from appcore.
|
||||
if ( window.appCore ) {
|
||||
postData = window.appCore.postData;
|
||||
|
||||
try {
|
||||
var sessionHistory = getWebNavigation().sessionHistory;
|
||||
var entry = sessionHistory.getEntryAtIndex(sessionHistory.index, false);
|
||||
postData = entry.postData;
|
||||
} catch(e) {
|
||||
}
|
||||
}
|
||||
|
||||
// Use stream xfer component to prompt for destination and save.
|
||||
var xfer = this.getService( "@mozilla.org/appshell/component/xfer;1",
|
||||
"nsIStreamTransfer" );
|
||||
|
Loading…
Reference in New Issue
Block a user