| goog.Disposable | |
| goog.debug.ErrorHandler | goog.Disposable |
|
handler
:
Handler for exceptions.
|
disposeInternal()
No description.
|
code » | ||
|
Get the index for a function. Used for internal indexing.
|
code » | ||
|
Helps #protectEntryPoint by actually creating the protected
wrapper function, after #protectEntryPoint determines that one does
not already exist for the given function. Can be overriden by subclasses
that may want to implement different error handling, or add additional
entry point hooks.
|
code » | ||
|
Private helper function to return a span that can be clicked on to display
an alert with the current stack trace. Newlines are replaced with a
placeholder so that they will not be html-escaped.
|
code » | ||
|
Installs exception protection for an entry point function. When an exception
is thrown from a protected function, a handler will be invoked to handle it.
|
code » | ||
protectWindowFunctionsHelper_(fnName)
Helper function for protecting setTimeout/setInterval.
Arguments:
|
code » | ||
protectWindowSetInterval()
Install exception protection for window.setInterval to handle exceptions.
|
code » | ||
protectWindowSetTimeout()
Installs exception protection for window.setTimeout to handle exceptions.
|
code » | ||
setAddTracersToProtectedFunctions(newVal)
Enable tracers when instrumenting entry points.
Arguments:
|
code » | ||
unwrap(fn)
No description.
Arguments:
|
code » | ||
wrap(fn)
No description.
Arguments:
|
code » |
dispose()
⇒ undefined
Disposes of the object. If the object hasn't already been disposed of, calls
#disposeInternal. Classes that extend
goog.Disposable should
override #disposeInternal in order to delete references to COM
objects, DOM nodes, and other disposable objects. Reentrant.
Returns:
undefined
Nothing.
|
code » | ||
disposeInternal()
Deletes or nulls out any references to COM objects, DOM nodes, or other
disposable objects. Classes that extend
goog.Disposable should
override this method.
Not reentrant. To avoid calling it twice, it must only be called from the
subclass' disposeInternal method. Everywhere else the public
dispose method must be used.
For example:
mypackage.MyClass = function() {
goog.base(this);
// Constructor logic specific to MyClass.
...
};
goog.inherits(mypackage.MyClass, goog.Disposable);
mypackage.MyClass.prototype.disposeInternal = function() {
goog.base(this, 'disposeInternal');
// Dispose logic specific to MyClass.
...
};
|
code » | ||
|
Use #isDisposed instead.
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
|
No description.
Returns:
Whether the object has been disposed of.
|
code » | ||
registerDisposable(disposable)
Associates a disposable object with this object so that they will be disposed
together.
Arguments:
|
code » |