com.google.javascript.jscomp
Class CheckEventfulObjectDisposal
java.lang.Object
com.google.javascript.jscomp.CheckEventfulObjectDisposal
- All Implemented Interfaces:
- CompilerPass
public class CheckEventfulObjectDisposal
- extends Object
- implements CompilerPass
Check to ensure there exists a path to dispose of each eventful object
created.
This compiler pass uses the inferred types and hence either type checking or
type inference needs to be enabled. The set of eventful objects is initialized
to {goog.events.Eventful} and, if the "aggressive" mode is set, expanded to a
larger class using the eventize relationship (see http://research.google.com/pubs/pub40738.html).
This pass is heuristic based and should not be used for any check
of pass/fail testing.
This check is performed interprocedurally but in a flow and path
insensitive manner.
Method Summary |
void |
process(Node externs,
Node root)
Process the JS with root node root. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DISPOSE_ALL
public static final int DISPOSE_ALL
- See Also:
- Constant Field Values
CheckEventfulObjectDisposal
public CheckEventfulObjectDisposal(AbstractCompiler compiler,
CheckEventfulObjectDisposal.DisposalCheckingPolicy checkingPolicy)
process
public void process(Node externs,
Node root)
- Description copied from interface:
CompilerPass
- Process the JS with root node root.
Can modify the contents of each Node tree
- Specified by:
process
in interface CompilerPass
- Parameters:
externs
- Top of external JS treeroot
- Top of JS tree