mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1193903 - Improve error reporting for out-of-process saveBrowser(). r=mconley
This commit is contained in:
parent
aa46626cb8
commit
94306e555a
@ -137,13 +137,15 @@ function saveBrowser(aBrowser, aSkipPrompt)
|
||||
let persistable = aBrowser.QueryInterface(Ci.nsIFrameLoaderOwner)
|
||||
.frameLoader
|
||||
.QueryInterface(Ci.nsIWebBrowserPersistable);
|
||||
let stack = Components.stack.caller;
|
||||
persistable.startPersistence({
|
||||
onDocumentReady: function (document) {
|
||||
saveDocument(document, aSkipPrompt);
|
||||
},
|
||||
onError: function (status) {
|
||||
throw new Components.Exception("saveBrowser failed asynchronously in startPersistence",
|
||||
status, stack);
|
||||
}
|
||||
// This interface also has an |onError| method which takes an
|
||||
// nsresult, but in case of asynchronous failure there isn't
|
||||
// really anything useful that can be done here.
|
||||
});
|
||||
}
|
||||
|
||||
@ -153,8 +155,7 @@ function saveBrowser(aBrowser, aSkipPrompt)
|
||||
// aDocument can also be a CPOW for a remote nsIDOMDocument, in which
|
||||
// case "save as" modes that serialize the document's DOM are
|
||||
// unavailable. This is a temporary measure for the "Save Frame As"
|
||||
// command (bug 1141337), and it's possible that there could be
|
||||
// add-ons doing something similar.
|
||||
// command (bug 1141337) and pre-e10s add-ons.
|
||||
function saveDocument(aDocument, aSkipPrompt)
|
||||
{
|
||||
const Ci = Components.interfaces;
|
||||
|
Loading…
Reference in New Issue
Block a user