Context.reportError("The first argument for synchronizedFunction() must be a Function object");
}
if (args.length == 1) {
TMLContext context = fetchInitialContext(cx);
return new SynchronizedFunction((Function) args[0], context.getwgacore());
}
else {
return new SynchronizedFunction((Function) args[0], args[1]);
}
}