Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-vue-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
open-hippy authored Nov 22, 2023
2 parents 7e985d6 + 60c4215 commit dd7121d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.tencent.mtt.hippy.annotation.HippyNativeModule.Thread;
import com.tencent.mtt.hippy.common.HippyArray;
import com.tencent.mtt.hippy.common.Provider;
import com.tencent.mtt.hippy.modules.HippyModulePromise;
import com.tencent.mtt.hippy.modules.Promise;
import com.tencent.mtt.hippy.modules.PromiseImpl;
import com.tencent.mtt.hippy.runtime.builtins.array.JSDenseArray;
Expand Down Expand Up @@ -208,7 +209,11 @@ private Object[] prepareArguments(@NonNull Object args, PromiseImpl promise)
int size = mUseJSValueType ? ((JSDenseArray) args).size() : ((HippyArray) args).size();
for (int i = 0; i < mParamTypes.length; i++) {
Type paramCls = mParamTypes[i];
if (paramCls == Promise.class) {
// It is necessary to be compatible with the HippyModulePromise type here,
// as some host custom modules interface promise parameters are directly defined
// using the HippyModulePromise type, resulting in parameter mismatches when
// calling the interface.
if (paramCls == Promise.class || paramCls == HippyModulePromise.class) {
params[i] = promise;
promise.setNeedResolveBySelf(false);
} else {
Expand Down

0 comments on commit dd7121d

Please sign in to comment.