Delete hidden browser even if processDocuments exception handler does not fail.

This commit is contained in:
Aurimas Vinckevicius 2013-01-31 19:50:57 -06:00
parent eed6d2f22c
commit 6b878ba9f1

View file

@ -208,14 +208,22 @@ Zotero.Utilities.Translate.prototype.processDocuments = function(urls, processor
var translate = this._translate;
if(exception) {
var myException = function(e) {
var browserDeleted;
try {
exception(e);
} catch(e) {
try {
Zotero.Browser.deleteHiddenBrowser(hiddenBrowser);
} catch(e) {}
browserDeleted = true;
translate.complete(false, e);
}
if(!browserDeleted) {
try {
Zotero.Browser.deleteHiddenBrowser(hiddenBrowser);
} catch(e) {}
}
}
} else {
var myException = function(e) {