public static Scriptable NewBuiltinObject(Context cx, Scriptable scope, TopLevel.Builtins type, object[] args)
{
scope = ScriptableObject.GetTopLevelScope(scope);
Function ctor = TopLevel.GetBuiltinCtor(cx, scope, type);
if (args == null)
{
args = ScriptRuntime.emptyArgs;
}
return ctor.Construct(cx, scope, args);
}