summaryrefslogtreecommitdiff
path: root/assets/viz/2/goog/disposable/disposable.js
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2018-11-13 00:24:09 -0500
committerBrian Picciano <mediocregopher@gmail.com>2018-11-13 00:24:09 -0500
commit2b4757367470d8e36bc00901dac567e375796ed4 (patch)
tree72368624006c21d28228a100ee88590c7bf95e58 /assets/viz/2/goog/disposable/disposable.js
parent5ed62d23b4bbbf7717de4adfa0eaf2af19365408 (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/disposable.js')
-rw-r--r--assets/viz/2/goog/disposable/disposable.js19
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_) {