zotero/chrome
Dan Stillman 6b87c641d9 Experimental approach to cancelling unnecessary promises
If a view or other resources are destroyed while a promise is being
resolved, subsequent code can fail. This is generally harmless, but it
results in unnecessary errors being logged to the console.

To address this, promises can use a new function,
Zotero.Promise.check(), to test whether a value is truthy or 0 and
automatically throw a specific error that's ignored by the unhandled
rejection handler if not.

Example usage:

getAsync().tap(() => Zotero.Promise.check(this.win));

If this.win is cleaned up while getAsync() is being resolved, subsequent
lines won't be run, and nothing will be logged to the console.
2015-05-23 04:43:37 -04:00
..
content Experimental approach to cancelling unnecessary promises 2015-05-23 04:43:37 -04:00
locale Change computerProgram 'version' to 'versionNumber' 2015-05-04 02:45:53 -04:00
skin/default/zotero Rename error/warning icons 2015-05-19 22:42:43 -04:00