Remove nativeEmpty, check call change to native side
This commit is contained in:
@@ -176,12 +176,6 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
return null;
|
||||
}
|
||||
});
|
||||
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_EMPTY, new JavaFunction() {
|
||||
@Override
|
||||
public JavaValue exec(JSDecoder[] args) {
|
||||
return null;
|
||||
}
|
||||
});
|
||||
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_REQUIRE, new JavaFunction() {
|
||||
@Override
|
||||
public JavaValue exec(JSDecoder[] args) {
|
||||
@@ -292,8 +286,10 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
for (Object arg : args) {
|
||||
values.add(DoricUtils.toJavaValue(arg));
|
||||
}
|
||||
return mDoricJSE.invokeMethod(DoricConstant.GLOBAL_DORIC, method,
|
||||
JSDecoder ret = mDoricJSE.invokeMethod(DoricConstant.GLOBAL_DORIC, method,
|
||||
values.toArray(new JavaValue[0]), false);
|
||||
mDoricJSE.invokeMethod(DoricConstant.GLOBAL_DORIC, DoricConstant.DORIC_HOOK_NATIVE_CALL, new JavaValue[0], false);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@@ -33,7 +33,6 @@ public class DoricConstant {
|
||||
public static final String INJECT_TIMER_SET = "nativeSetTimer";
|
||||
public static final String INJECT_TIMER_CLEAR = "nativeClearTimer";
|
||||
public static final String INJECT_BRIDGE = "nativeBridge";
|
||||
public static final String INJECT_EMPTY = "nativeEmpty";
|
||||
|
||||
public static final String TEMPLATE_CONTEXT_CREATE = "Reflect.apply(" +
|
||||
"function(doric,context,Entry,require,exports){" + "\n" +
|
||||
@@ -64,6 +63,7 @@ public class DoricConstant {
|
||||
public static final String DORIC_TIMER_CALLBACK = "jsCallbackTimer";
|
||||
public static final String DORIC_BRIDGE_RESOLVE = "jsCallResolve";
|
||||
public static final String DORIC_BRIDGE_REJECT = "jsCallReject";
|
||||
public static final String DORIC_HOOK_NATIVE_CALL = "jsHookAfterNativeCall";
|
||||
|
||||
|
||||
public static final String DORIC_ENTITY_RESPONSE = "__response__";
|
||||
|
Reference in New Issue
Block a user