issue #5934 : fix callFunc potential crashes on jsb