Package org.htmlunit.javascript
Class HtmlUnitContextFactory.TimeoutContext
- java.lang.Object
-
- org.htmlunit.corejs.javascript.Context
-
- org.htmlunit.javascript.HtmlUnitContextFactory.TimeoutContext
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
- Enclosing class:
- HtmlUnitContextFactory
private class HtmlUnitContextFactory.TimeoutContext extends org.htmlunit.corejs.javascript.Context
Custom context to store execution time and handle timeouts.
-
-
Field Summary
Fields Modifier and Type Field Description private long
startTime_
-
Fields inherited from class org.htmlunit.corejs.javascript.Context
emptyArgs, errorReporterProperty, FEATURE_DYNAMIC_SCOPE, FEATURE_E4X, FEATURE_ENABLE_JAVA_MAP_ACCESS, FEATURE_ENABLE_XML_SECURE_PARSING, FEATURE_ENHANCED_JAVA_ACCESS, FEATURE_ENUMERATE_IDS_FIRST, FEATURE_HTMLUNIT_FN_ARGUMENTS_IS_RO_VIEW, FEATURE_HTMLUNIT_FUNCTION_DECLARED_FORWARD_IN_BLOCK, FEATURE_HTMLUNIT_MEMBERBOX_NAME, FEATURE_HTMLUNIT_MEMBERBOX_NEWLINE, FEATURE_INTEGER_WITHOUT_DECIMAL_PLACE, FEATURE_INTL_402, FEATURE_LITTLE_ENDIAN, FEATURE_LOCATION_INFORMATION_IN_ERROR, FEATURE_MEMBER_EXPR_AS_FUNCTION_NAME, FEATURE_NON_ECMA_GET_YEAR, FEATURE_OLD_UNDEF_NULL_THIS, FEATURE_PARENT_PROTO_PROPERTIES, FEATURE_PARENT_PROTO_PROPRTIES, FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER, FEATURE_STRICT_EVAL, FEATURE_STRICT_MODE, FEATURE_STRICT_VARS, FEATURE_THREAD_SAFE_OBJECTS, FEATURE_TO_STRING_AS_SOURCE, FEATURE_V8_EXTENSIONS, FEATURE_WARNING_AS_ERROR, generateObserverCount, languageVersionProperty, VERSION_1_0, VERSION_1_1, VERSION_1_2, VERSION_1_3, VERSION_1_4, VERSION_1_5, VERSION_1_6, VERSION_1_7, VERSION_1_8, VERSION_DEFAULT, VERSION_ES6, VERSION_UNKNOWN
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
TimeoutContext(org.htmlunit.corejs.javascript.ContextFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.htmlunit.corejs.javascript.Function
compileFunction(org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String source, org.htmlunit.corejs.javascript.Evaluator compiler, org.htmlunit.corejs.javascript.ErrorReporter compilationErrorReporter, java.lang.String sourceName, int lineno, java.lang.Object securityDomain)
protected org.htmlunit.corejs.javascript.Script
compileString(java.lang.String source, org.htmlunit.corejs.javascript.Evaluator compiler, org.htmlunit.corejs.javascript.ErrorReporter compilationErrorReporter, java.lang.String sourceName, int lineno, java.lang.Object securityDomain)
void
startClock()
void
terminateScriptIfNecessary()
-
Methods inherited from class org.htmlunit.corejs.javascript.Context
addActivationName, addContextListener, addPropertyChangeListener, call, call, callFunctionWithContinuations, captureContinuation, checkLanguageVersion, checkOptimizationLevel, close, compileFunction, compileImpl, compileReader, compileReader, compileString, createClassLoader, decompileFunction, decompileFunctionBody, decompileScript, enqueueMicrotask, enter, enter, evaluateReader, evaluateString, executeScriptWithContinuations, exit, getApplicationClassLoader, getClassShutterSetter, getCurrentContext, getDebuggableView, getDebugger, getDebuggerContextData, getE4xImplementationFactory, getElements, getErrorReporter, getFactory, getImplementationVersion, getInstructionObserverThreshold, getJavaToJSONConverter, getLanguageVersion, getLocale, getMaximumInterpreterStackDepth, getOptimizationLevel, getThreadLocal, getTimeZone, getUndefinedValue, getUnhandledPromiseTracker, getWrapFactory, hasFeature, initSafeStandardObjects, initSafeStandardObjects, initSafeStandardObjects, initStandardObjects, initStandardObjects, initStandardObjects, isActivationNeeded, isCurrentContextStrict, isGeneratingDebug, isGeneratingDebugChanged, isGeneratingSource, isSealed, isStrictMode, isValidLanguageVersion, isValidOptimizationLevel, javaToJS, javaToJS, jsToJava, newArray, newArray, newObject, newObject, newObject, observeInstructionCount, processMicrotasks, putThreadLocal, removeActivationName, removeContextListener, removePropertyChangeListener, removeThreadLocal, reportError, reportError, reportRuntimeError, reportRuntimeError, reportWarning, reportWarning, reportWarning, resumeContinuation, seal, setApplicationClassLoader, setCachingEnabled, setClassShutter, setDebugger, setErrorReporter, setGenerateObserverCount, setGeneratingDebug, setGeneratingSource, setInstructionObserverThreshold, setJavaToJSONConverter, setLanguageVersion, setLocale, setMaximumInterpreterStackDepth, setOptimizationLevel, setSecurityController, setTimeZone, setTrackUnhandledPromiseRejections, setWrapFactory, stringIsCompilableUnit, throwAsScriptRuntimeEx, toBoolean, toNumber, toObject, toObject, toString, toType, unseal
-
-
-
-
Method Detail
-
startClock
public void startClock()
-
terminateScriptIfNecessary
public void terminateScriptIfNecessary()
-
compileString
protected org.htmlunit.corejs.javascript.Script compileString(java.lang.String source, org.htmlunit.corejs.javascript.Evaluator compiler, org.htmlunit.corejs.javascript.ErrorReporter compilationErrorReporter, java.lang.String sourceName, int lineno, java.lang.Object securityDomain)
- Overrides:
compileString
in classorg.htmlunit.corejs.javascript.Context
-
compileFunction
protected org.htmlunit.corejs.javascript.Function compileFunction(org.htmlunit.corejs.javascript.Scriptable scope, java.lang.String source, org.htmlunit.corejs.javascript.Evaluator compiler, org.htmlunit.corejs.javascript.ErrorReporter compilationErrorReporter, java.lang.String sourceName, int lineno, java.lang.Object securityDomain)
- Overrides:
compileFunction
in classorg.htmlunit.corejs.javascript.Context
-
-