fix potential recurrence of garbage collection nightmare
This commit is contained in:
parent
03be861eff
commit
621e43a39c
1 changed files with 3 additions and 1 deletions
|
@ -139,7 +139,6 @@ Zotero.Translate.IO.maintainedInstances = [];
|
||||||
/******* (Native) Read support *******/
|
/******* (Native) Read support *******/
|
||||||
|
|
||||||
Zotero.Translate.IO.Read = function(file, mode) {
|
Zotero.Translate.IO.Read = function(file, mode) {
|
||||||
Zotero.Translate.IO.maintainedInstances.push(this);
|
|
||||||
this.file = file;
|
this.file = file;
|
||||||
|
|
||||||
// open file
|
// open file
|
||||||
|
@ -388,6 +387,9 @@ Zotero.Translate.IO.Read.prototype = {
|
||||||
},
|
},
|
||||||
|
|
||||||
"reset":function(newMode) {
|
"reset":function(newMode) {
|
||||||
|
if(Zotero.Translate.IO.maintainedInstances.indexOf(this) === -1) {
|
||||||
|
Zotero.Translate.IO.maintainedInstances.push(this);
|
||||||
|
}
|
||||||
this._seekToStart(this._charset);
|
this._seekToStart(this._charset);
|
||||||
|
|
||||||
this._mode = newMode;
|
this._mode = newMode;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue