codex fix

Why
The data types of the variables do not match

Description
Change the input parameter type of CallWorkerFunction and CallHostFunction functions from int to size_t

Signed-off-by: y00576111 <yaojian16@huawei.com>
Change-Id: I203029a7f55d139be09fe4bc9aa5c9653f1f8165
This commit is contained in:
y00576111
2022-02-16 19:58:47 +08:00
parent 90a20438f9
commit da6cfdd644
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1073,7 +1073,7 @@ void Worker::WorkerOnErrorInner(napi_value error)
CallWorkerFunction(1, argv, "onerror", false);
}
bool Worker::CallWorkerFunction(int argc, const napi_value* argv, const char* methodName, bool tryCatch)
bool Worker::CallWorkerFunction(size_t argc, const napi_value* argv, const char* methodName, bool tryCatch)
{
if (workerEnv_ == nullptr) {
return false;
@@ -1110,7 +1110,7 @@ void Worker::CloseWorkerCallback()
}
}
void Worker::CallHostFunction(int argc, const napi_value* argv, const char* methodName) const
void Worker::CallHostFunction(size_t argc, const napi_value* argv, const char* methodName) const
{
if (hostEnv_ == nullptr || HostIsStop()) {
HILOG_ERROR("worker:: host thread maybe is over");
+2 -2
View File
@@ -216,8 +216,8 @@ private:
void WorkerOnErrorInner(napi_value error);
void HandleException();
bool CallWorkerFunction(int argc, const napi_value* argv, const char* methodName, bool tryCatch);
void CallHostFunction(int argc, const napi_value* argv, const char* methodName) const;
bool CallWorkerFunction(size_t argc, const napi_value* argv, const char* methodName, bool tryCatch);
void CallHostFunction(size_t argc, const napi_value* argv, const char* methodName) const;
void HandleEventListeners(napi_env env, napi_value recv, size_t argc, const napi_value* argv, const char* type);
void ParentPortHandleEventListeners(napi_env env, napi_value recv,