< prev index next >
src/jdk.scripting.nashorn/share/classes/jdk/nashorn/internal/runtime/RecompilableScriptFunctionData.java
Print this page
*** 98,108 ****
/**
* Cached form of the AST. Either a {@code SerializedAst} object used by split functions as they can't be
* reparsed from source, or a soft reference to a {@code FunctionNode} for other functions (it is safe
* to be cleared as they can be reparsed).
*/
! private volatile Object cachedAst;
/** Token of this function within the source. */
private final long token;
/**
--- 98,108 ----
/**
* Cached form of the AST. Either a {@code SerializedAst} object used by split functions as they can't be
* reparsed from source, or a soft reference to a {@code FunctionNode} for other functions (it is safe
* to be cleared as they can be reparsed).
*/
! private volatile transient Object cachedAst;
/** Token of this function within the source. */
private final long token;
/**
*** 287,296 ****
--- 287,299 ----
*/
public void initTransients(final Source src, final CodeInstaller inst) {
if (this.source == null && this.installer == null) {
this.source = src;
this.installer = inst;
+ for (final RecompilableScriptFunctionData nested : nestedFunctions.values()) {
+ nested.initTransients(src, inst);
+ }
} else if (this.source != src || !this.installer.isCompatibleWith(inst)) {
// Existing values must be same as those passed as parameters
throw new IllegalArgumentException();
}
}
< prev index next >