@Override protected Context makeContext() { Context cx = super.makeContext(); cx.setOptimizationLevel(-1); return cx; } });
protected Context makeContext() { Context cx = super.makeContext(); cx.setOptimizationLevel(-1); return cx; } });
protected Context makeContext() { Context cx = super.makeContext(); cx.setOptimizationLevel(-1); return cx; } });
@Override protected Context makeContext() { Context cx = super.makeContext(); cx.setOptimizationLevel(-1); cx.setWrapFactory(new CustomWrapFactory()); return cx; }
private static Context prepareNewContext(ContextFactory factory, Object contextHelper) { Context cx = factory.makeContext(); if (cx.factory != null || cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } cx.factory = factory; factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } VMBridge.instance.setContext(contextHelper, cx); return cx; }
/** * Creates a Context object for use with the interpreter. */ protected Context makeContext() { Context cx = super.makeContext(); cx.setWrapFactory(wrapFactory); cx.setSecurityController(securityController); cx.setClassShutter(classShutter); if (rhinoClassLoader == null) { cx.setOptimizationLevel(-1); } return cx; } }
/** * Creates a Context object for use with the interpreter. */ protected Context makeContext() { Context cx = super.makeContext(); cx.setWrapFactory(wrapFactory); cx.setSecurityController(securityController); cx.setClassShutter(classShutter); if (rhinoClassLoader == null) { cx.setOptimizationLevel(-1); } return cx; } }
/** * Creates a Context object for use with the interpreter. */ protected Context makeContext() { Context cx = super.makeContext(); cx.setWrapFactory(wrapFactory); cx.setSecurityController(securityController); cx.setClassShutter(classShutter); if (rhinoClassLoader == null) { cx.setOptimizationLevel(-1); } return cx; } }
static final Context enter(Context cx, ContextFactory factory) { Object helper = VMBridge.instance.getThreadContextHelper(); Context old = VMBridge.instance.getContext(helper); if (old != null) { cx = old; } else { if (cx == null) { cx = factory.makeContext(); if (cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } } else { if (cx.enterCount != 0) { throw new IllegalStateException("can not use Context instance already associated with some thread"); } } VMBridge.instance.setContext(helper, cx); } ++cx.enterCount; return cx; }
static final Context enter(Context cx, ContextFactory factory) { Object helper = VMBridge.instance.getThreadContextHelper(); Context old = VMBridge.instance.getContext(helper); if (old != null) { cx = old; } else { if (cx == null) { cx = factory.makeContext(); if (cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } } else { if (cx.enterCount != 0) { throw new IllegalStateException("can not use Context instance already associated with some thread"); } } VMBridge.instance.setContext(helper, cx); } ++cx.enterCount; return cx; }
static final Context enter(Context cx, ContextFactory factory) { Object helper = VMBridge.instance.getThreadContextHelper(); Context old = VMBridge.instance.getContext(helper); if (old != null) { cx = old; } else { if (cx == null) { cx = factory.makeContext(); if (cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } } else { if (cx.enterCount != 0) { throw new IllegalStateException("can not use Context instance already associated with some thread"); } } VMBridge.instance.setContext(helper, cx); } ++cx.enterCount; return cx; }
static final Context enter(Context cx, ContextFactory factory) { Object helper = VMBridge.instance.getThreadContextHelper(); Context old = VMBridge.instance.getContext(helper); if (old != null) { cx = old; } else { if (cx == null) { cx = factory.makeContext(); if (cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } } else { if (cx.enterCount != 0) { throw new IllegalStateException("can not use Context instance already associated with some thread"); } } VMBridge.instance.setContext(helper, cx); } ++cx.enterCount; return cx; }
static final Context enter(Context cx, ContextFactory factory) { Object helper = VMBridge.instance.getThreadContextHelper(); Context old = VMBridge.instance.getContext(helper); if (old != null) { cx = old; } else { if (cx == null) { cx = factory.makeContext(); if (cx.enterCount != 0) { throw new IllegalStateException("factory.makeContext() returned Context instance already associated with some thread"); } factory.onContextCreated(cx); if (factory.isSealed() && !cx.isSealed()) { cx.seal(null); } } else { if (cx.enterCount != 0) { throw new IllegalStateException("can not use Context instance already associated with some thread"); } } VMBridge.instance.setContext(helper, cx); } ++cx.enterCount; return cx; }
/** * Create new Context instance to be associated with the current thread. */ @Override protected Context makeContext() { Context cx = super.makeContext(); cx.setLanguageVersion(languageVersion); cx.setOptimizationLevel(optimizationLevel); cx.setClassShutter(RhinoClassShutter.getInstance()); cx.setWrapFactory(RhinoWrapFactory.getInstance()); return cx; }
} else { if (cx == null) { cx = factory.makeContext(); } else { if (cx.sealed) onSealedMutation();