@Override protected void onContextCreated(Context cx) { cx.setLanguageVersion(languageVersion); cx.setOptimizationLevel(optimizationLevel); if (errorReporter != null) { cx.setErrorReporter(errorReporter); } cx.setGeneratingDebug(generatingDebug); super.onContextCreated(cx); }
@Override protected void onContextCreated(Context cx) { cx.setLanguageVersion(languageVersion); cx.setOptimizationLevel(optimizationLevel); if (errorReporter != null) { cx.setErrorReporter(errorReporter); } cx.setGeneratingDebug(generatingDebug); super.onContextCreated(cx); }
/** * Called when a Context is created. */ public void contextCreated(Context cx) { if (type != IPROXY_LISTEN) Kit.codeBug(); ContextData contextData = new ContextData(); Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG); cx.setDebugger(debugger, contextData); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); }
/** * Called when a Context is created. */ public void contextCreated(Context cx) { if (type != IPROXY_LISTEN) Kit.codeBug(); ContextData contextData = new ContextData(); Debugger debugger = new DimIProxy(dim, IPROXY_DEBUG); cx.setDebugger(debugger, contextData); cx.setGeneratingDebug(true); cx.setOptimizationLevel(-1); }
private void enableDebugger(HttpServletRequest request, HttpServletResponse response, String moduleOrCode, Context context) { Context rhinoContext = (Context) context; ErrorReporter reporter = new RhinoJavascriptDebugInvocationErrorReporter(); rhinoContext.setErrorReporter(reporter); String userId = UserFacade.getName(request); logger.debug("creating DebugModel ..."); DebugModel debugModel = DebugManager.getDebugModel(userId); if (debugModel == null) { debugModel = DebugModelFacade.createDebugModel(userId, new RhinoJavascriptDebugController(userId)); } logger.debug("creating JavascriptDebugger ..."); RhinoJavascriptDebugger debugger = new RhinoJavascriptDebugger(debugModel, request); rhinoContext.setDebugger(debugger, JAVA_SCRIPT_DEBUGGER); logger.debug("created JavascriptDebugger"); RhinoJavascriptDebugSender.sendCurrentSessions(userId, debugModel); rhinoContext.setGeneratingDebug(true); rhinoContext.setOptimizationLevel(-1); }
Context ctx = ContextFactory.getGlobal().enterContext(); ctx.setOptimizationLevel(-1); ctx.setGeneratingDebug(false); ctx.setGeneratingSource(false); ctx.setDebugger(null, null);
cx.setGeneratingDebug(false); try { Callable script = (Callable)cx.compileString(expr, "", 0, null); resultString = exc.getMessage(); } finally { cx.setGeneratingDebug(true); cx.setOptimizationLevel(saved_level); cx.setDebugger(saved_debugger, saved_data);
cx.setGeneratingDebug(false); try { Callable script = (Callable)cx.compileString(expr, "", 0, null); resultString = exc.getMessage(); } finally { cx.setGeneratingDebug(true); cx.setOptimizationLevel(saved_level); cx.setDebugger(saved_debugger, saved_data);
public void initialize() throws Exception { if (enableDebugger) { if (getLogger().isDebugEnabled()) { getLogger().debug("Flow debugger enabled, creating"); } getDebugger().doBreak(); } Context context = Context.enter(); context.setOptimizationLevel(OPTIMIZATION_LEVEL); context.setCompileFunctionsWithDynamicScope(true); context.setGeneratingDebug(true); // add support for Rhino objects to JXPath JXPathIntrospector.registerDynamicClass(Scriptable.class, ScriptablePropertyHandler.class); JXPathContextReferenceImpl.addNodePointerFactory(new ScriptablePointerFactory()); try { scope = new Global(context); // Access to Cocoon internal objects FOM_Cocoon.init(scope); } catch (Exception e) { Context.exit(); throw e; } }
cx.setGeneratingDebug(false); cx.setGeneratingSource(false); cx.setOptimizationLevel(0);
context.setGeneratingDebug(true); context.setCompileFunctionsWithDynamicScope(true); LocationTrackingDebugger locationTracker = new LocationTrackingDebugger();
Context context = Context.enter(); context.setOptimizationLevel(OPTIMIZATION_LEVEL); context.setGeneratingDebug(true); context.setCompileFunctionsWithDynamicScope(true); context.setErrorReporter(new JSErrorReporter());
cx.setGeneratingDebug(false); cx.setGeneratingSource(false); cx.setOptimizationLevel(0);