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
Родитель fd0bbffded
Коммит cde79a72b8
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -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;
]]>