Delete hidden browser even if processDocuments exception handler does not fail.
This commit is contained in:
parent
eed6d2f22c
commit
6b878ba9f1
1 changed files with 8 additions and 0 deletions
|
@ -208,14 +208,22 @@ Zotero.Utilities.Translate.prototype.processDocuments = function(urls, processor
|
||||||
var translate = this._translate;
|
var translate = this._translate;
|
||||||
if(exception) {
|
if(exception) {
|
||||||
var myException = function(e) {
|
var myException = function(e) {
|
||||||
|
var browserDeleted;
|
||||||
try {
|
try {
|
||||||
exception(e);
|
exception(e);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
try {
|
try {
|
||||||
Zotero.Browser.deleteHiddenBrowser(hiddenBrowser);
|
Zotero.Browser.deleteHiddenBrowser(hiddenBrowser);
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
browserDeleted = true;
|
||||||
translate.complete(false, e);
|
translate.complete(false, e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!browserDeleted) {
|
||||||
|
try {
|
||||||
|
Zotero.Browser.deleteHiddenBrowser(hiddenBrowser);
|
||||||
|
} catch(e) {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var myException = function(e) {
|
var myException = function(e) {
|
||||||
|
|
Loading…
Reference in a new issue