rem:   if (aDocument) saveInternal(aDocument.location.href, aDocument, false, aSkipPrompt); else saveInternal(content.location.href, null, false, aSkipPrompt); 
add: if (!aDocument) throw "Must have a document when calling saveDocument";   var contentDisposition = null; try { contentDisposition = aDocument.defaultView .QueryInterface(Components.interfaces.nsIInterfaceRequestor) .getInterface(Components.interfaces.nsIDOMWindowUtils) .getDocumentMetadata("content-disposition"); } catch (ex) {  } internalSave(aDocument.location.href, aDocument, null, contentDisposition, aDocument.contentType, false, null, null, aSkipPrompt); 
context: function saveDocument(aDocument, aSkipPrompt){  // In both cases here, we want to use cached data because the   // document is currently visible.   if (aDocument)     saveInternal(aDocument.location.href, aDocument, false, aSkipPrompt);  else    saveInternal(content.location.href, null, false, aSkipPrompt);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/95369b9b14ae5c09bee9e76368e54c952025448a/contentAreaUtils.js/buggy/toolkit/content/contentAreaUtils.js