make JavascriptFunction enter JavascriptContext before calling apply

still throws AccessViolationException