Fixing regression caused by the committed patch under bug 255595

This commit is contained in:
igor%mir2.org 2004-08-16 09:57:15 +00:00
Родитель 67000d046b
Коммит 2b2decb7d3
1 изменённых файлов: 7 добавлений и 1 удалений

Просмотреть файл

@ -124,7 +124,13 @@ public class ScriptRuntime {
scope = new NativeObject();
}
scope.associateValue(LIBRARY_SCOPE_KEY, scope);
scope.associateValue(CONTEXT_FACTORY_KEY, cx.getFactory());
ContextFactory factory = cx.getFactory();
if (factory == null) {
// factory is null for Context asociated with the current thread
// via Context.enter()
factory = ContextFactory.getGlobal();
}
scope.associateValue(CONTEXT_FACTORY_KEY, factory);
(new ClassCache()).associate(scope);
BaseFunction.init(cx, scope, sealed);