--- old/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java 2014-03-14 20:34:20.006937637 +0530 +++ new/src/jdk/nashorn/internal/runtime/ScriptFunctionData.java 2014-03-14 20:34:19.914937182 +0530 @@ -32,6 +32,7 @@ import java.lang.invoke.MethodHandle; import java.lang.invoke.MethodHandles; import java.lang.invoke.MethodType; +import jdk.nashorn.internal.objects.Global; import jdk.nashorn.internal.runtime.linker.JavaAdapterFactory; /** @@ -372,11 +373,11 @@ private Object convertThisObject(final Object thiz) { if (!(thiz instanceof ScriptObject) && needsWrappedThis()) { if (JSType.nullOrUndefined(thiz)) { - return Context.getGlobalTrusted(); + return Context.getGlobal(); } if (isPrimitiveThis(thiz)) { - return ((GlobalObject)Context.getGlobalTrusted()).wrapAsObject(thiz); + return Context.getGlobal().wrapAsObject(thiz); } }