diff options
author | Brian Picciano <mediocregopher@gmail.com> | 2018-11-13 00:24:09 -0500 |
---|---|---|
committer | Brian Picciano <mediocregopher@gmail.com> | 2018-11-13 00:24:09 -0500 |
commit | 2b4757367470d8e36bc00901dac567e375796ed4 (patch) | |
tree | 72368624006c21d28228a100ee88590c7bf95e58 /assets/viz/2/goog/disposable | |
parent | 5ed62d23b4bbbf7717de4adfa0eaf2af19365408 (diff) |
update viz 2 to use the newest version, which has some performance improvements and is easier to read the code for. also update the description
Diffstat (limited to 'assets/viz/2/goog/disposable')
-rw-r--r-- | assets/viz/2/goog/disposable/disposable.js | 19 | ||||
-rw-r--r-- | assets/viz/2/goog/disposable/idisposable.js | 4 |
2 files changed, 10 insertions, 13 deletions
diff --git a/assets/viz/2/goog/disposable/disposable.js b/assets/viz/2/goog/disposable/disposable.js index ca8d088..a86f549 100644 --- a/assets/viz/2/goog/disposable/disposable.js +++ b/assets/viz/2/goog/disposable/disposable.js @@ -20,9 +20,7 @@ goog.provide('goog.Disposable'); -/** @suppress {extraProvide} */ goog.provide('goog.dispose'); -/** @suppress {extraProvide} */ goog.provide('goog.disposeAll'); goog.require('goog.disposable.IDisposable'); @@ -38,6 +36,13 @@ goog.require('goog.disposable.IDisposable'); * @implements {goog.disposable.IDisposable} */ goog.Disposable = function() { + /** + * If monitoring the goog.Disposable instances is enabled, stores the creation + * stack trace of the Disposable instance. + * @type {string|undefined} + */ + this.creationStack; + if (goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF) { if (goog.Disposable.INCLUDE_STACK_ON_CREATION) { this.creationStack = new Error().stack; @@ -140,14 +145,6 @@ goog.Disposable.prototype.onDisposeCallbacks_; /** - * If monitoring the goog.Disposable instances is enabled, stores the creation - * stack trace of the Disposable instance. - * @const {string} - */ -goog.Disposable.prototype.creationStack; - - -/** * @return {boolean} Whether the object has been disposed of. * @override */ @@ -215,7 +212,7 @@ goog.Disposable.prototype.registerDisposable = function(disposable) { */ goog.Disposable.prototype.addOnDisposeCallback = function(callback, opt_scope) { if (this.disposed_) { - callback.call(opt_scope); + goog.isDef(opt_scope) ? callback.call(opt_scope) : callback(); return; } if (!this.onDisposeCallbacks_) { diff --git a/assets/viz/2/goog/disposable/idisposable.js b/assets/viz/2/goog/disposable/idisposable.js index 917d17e..b539eb6 100644 --- a/assets/viz/2/goog/disposable/idisposable.js +++ b/assets/viz/2/goog/disposable/idisposable.js @@ -25,9 +25,9 @@ goog.provide('goog.disposable.IDisposable'); /** * Interface for a disposable object. If a instance requires cleanup - * (references COM objects, DOM notes, or other disposable objects), it should + * (references COM objects, DOM nodes, or other disposable objects), it should * implement this interface (it may subclass goog.Disposable). - * @interface + * @record */ goog.disposable.IDisposable = function() {}; |