diff options
Diffstat (limited to 'assets/viz/2/goog/disposable/disposable.js')
-rw-r--r-- | assets/viz/2/goog/disposable/disposable.js | 19 |
1 files changed, 8 insertions, 11 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_) { |