- Addresses #1828, Ensure any code that uses nsITimer directly maintains a global reference until callback executes
- Adds an optional runWhenWaiting argument to Zotero.setTimeout(), so that code can be set to run even if Zotero.wait() is in progress
This commit is contained in:
parent
5d32e800fc
commit
acfd317de9
3 changed files with 12 additions and 20 deletions
|
@ -62,9 +62,7 @@ ZoteroCommandLineHandler.prototype = {
|
|||
|
||||
// Not quite sure why this is necessary to get the appropriate scoping
|
||||
var Zotero = this.Zotero;
|
||||
var timer = Components.classes["@mozilla.org/timer;1"].createInstance(Components.interfaces.nsITimer);
|
||||
timer.initWithCallback({notify:function() { Zotero.Integration.execCommand(agent, command, docId) }}, 0,
|
||||
Components.interfaces.nsITimer.TYPE_ONE_SHOT);
|
||||
Zotero.setTimeout(function() { Zotero.Integration.execCommand(agent, command, docId) }, 0);
|
||||
}
|
||||
|
||||
// handler for Windows IPC commands
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue