Remove nativeEmpty, check call change to native side
This commit is contained in:
@@ -1204,11 +1204,6 @@ var doric = (function (exports) {
|
||||
context.hookBeforeNativeCall();
|
||||
}
|
||||
}
|
||||
function hookAfterNativeCall(context) {
|
||||
if (context) {
|
||||
context.hookAfterNativeCall();
|
||||
}
|
||||
}
|
||||
function getContext() {
|
||||
return Reflect.getMetadata('__doric_context__', global$1);
|
||||
}
|
||||
@@ -1232,7 +1227,6 @@ var doric = (function (exports) {
|
||||
}
|
||||
hookBeforeNativeCall(context);
|
||||
Reflect.apply(callback.resolve, context, argumentsList);
|
||||
hookAfterNativeCall(context);
|
||||
}
|
||||
function jsCallReject(contextId, callbackId, args) {
|
||||
const context = gContexts.get(contextId);
|
||||
@@ -1251,7 +1245,6 @@ var doric = (function (exports) {
|
||||
}
|
||||
hookBeforeNativeCall(context);
|
||||
Reflect.apply(callback.reject, context.entity, argumentsList);
|
||||
hookAfterNativeCall(context);
|
||||
}
|
||||
class Context {
|
||||
constructor(id) {
|
||||
@@ -1390,7 +1383,6 @@ var doric = (function (exports) {
|
||||
}
|
||||
hookBeforeNativeCall(context);
|
||||
const ret = Reflect.apply(Reflect.get(context.entity, methodName), context.entity, argumentsList);
|
||||
hookAfterNativeCall(context);
|
||||
return ret;
|
||||
}
|
||||
else {
|
||||
@@ -1545,11 +1537,15 @@ var doric = (function (exports) {
|
||||
return;
|
||||
}
|
||||
if (timerInfo.callback instanceof Function) {
|
||||
setContext(timerInfo.context);
|
||||
hookBeforeNativeCall(timerInfo.context);
|
||||
Reflect.apply(timerInfo.callback, timerInfo.context, []);
|
||||
hookAfterNativeCall(timerInfo.context);
|
||||
}
|
||||
}
|
||||
function jsHookAfterNativeCall() {
|
||||
const context = getContext();
|
||||
context === null || context === void 0 ? void 0 : context.hookAfterNativeCall();
|
||||
}
|
||||
|
||||
exports.Context = Context;
|
||||
exports.__require__ = __require__;
|
||||
@@ -1558,6 +1554,7 @@ var doric = (function (exports) {
|
||||
exports.jsCallReject = jsCallReject;
|
||||
exports.jsCallResolve = jsCallResolve;
|
||||
exports.jsCallbackTimer = jsCallbackTimer;
|
||||
exports.jsHookAfterNativeCall = jsHookAfterNativeCall;
|
||||
exports.jsObtainContext = jsObtainContext;
|
||||
exports.jsObtainEntry = jsObtainEntry;
|
||||
exports.jsRegisterModule = jsRegisterModule;
|
||||
|
||||
Reference in New Issue
Block a user