private static RegExpImpl getImpl(Context cx) { return (RegExpImpl) ScriptRuntime.getRegExpProxy(cx); }
private static RegExpImpl getImpl() { Context cx = Context.getCurrentContext(); return (RegExpImpl) ScriptRuntime.getRegExpProxy(cx); }
public static RegExpProxy checkRegExpProxy(Context cx) { RegExpProxy result = getRegExpProxy(cx); if (result == null) { throw Context.reportRuntimeError0("msg.no.regexp"); } return result; }
if (reImpl != ScriptRuntime.getRegExpProxy(cx)) Kit.codeBug(); RegExpImpl re2 = new RegExpImpl(); re2.multiline = reImpl.multiline;
RegExpProxy reProxy = null; if (args[0] instanceof Scriptable) { reProxy = ScriptRuntime.getRegExpProxy(cx); if (reProxy != null) { Scriptable test = (Scriptable)args[0];
/** * {@inheritDoc} */ @Override protected Context makeContext() { final TimeoutContext cx = new TimeoutContext(this); // Use pure interpreter mode to get observeInstructionCount() callbacks. cx.setOptimizationLevel(-1); // Set threshold on how often we want to receive the callbacks cx.setInstructionObserverThreshold(INSTRUCTION_COUNT_THRESHOLD); configureErrorReporter(cx); cx.setWrapFactory(wrapFactory_); if (debugger_ != null) { cx.setDebugger(debugger_, null); } // register custom RegExp processing ScriptRuntime.setRegExpProxy(cx, new HtmlUnitRegExpProxy(ScriptRuntime.getRegExpProxy(cx))); return cx; }
/** * {@inheritDoc} */ @Override protected Context makeContext() { final TimeoutContext cx = new TimeoutContext(this); // Use pure interpreter mode to get observeInstructionCount() callbacks. cx.setOptimizationLevel(-1); // Set threshold on how often we want to receive the callbacks cx.setInstructionObserverThreshold(INSTRUCTION_COUNT_THRESHOLD); configureErrorReporter(cx); cx.setWrapFactory(wrapFactory_); if (debugger_ != null) { cx.setDebugger(debugger_, null); } // register custom RegExp processing ScriptRuntime.setRegExpProxy(cx, new HtmlUnitRegExpProxy(ScriptRuntime.getRegExpProxy(cx))); return cx; }
/** * {@inheritDoc} */ @Override protected Context makeContext() { final TimeoutContext cx = new TimeoutContext(this); // Use pure interpreter mode to get observeInstructionCount() callbacks. cx.setOptimizationLevel(-1); // Set threshold on how often we want to receive the callbacks cx.setInstructionObserverThreshold(INSTRUCTION_COUNT_THRESHOLD); configureErrorReporter(cx); cx.setWrapFactory(wrapFactory_); if (debugger_ != null) { cx.setDebugger(debugger_, null); } // register custom RegExp processing ScriptRuntime.setRegExpProxy(cx, new HtmlUnitRegExpProxy(ScriptRuntime.getRegExpProxy(cx))); return cx; }