Bug 1197927 - Sanitize throws exception if browser goes away too quickly. r=felipe

This commit is contained in:
Ursula 2015-08-24 14:34:56 -04:00
parent fd0bbffded
commit cde79a72b8

View File

@ -406,7 +406,11 @@
<method name="purgeSessionHistory">
<body>
<![CDATA[
this.messageManager.sendAsyncMessage("Browser:PurgeSessionHistory");
try {
this.messageManager.sendAsyncMessage("Browser:PurgeSessionHistory");
} catch (ex if ex.result == Components.results.NS_ERROR_NOT_INITIALIZED) {
// This can throw if the browser has started to go away.
}
this.webNavigation.canGoBack = false;
this.webNavigation.canGoForward = false;
]]>