From 4cbfee6194650ac2f00a1e2e2adb2c819314c279 Mon Sep 17 00:00:00 2001 From: m00512953 Date: Thu, 20 Oct 2022 16:01:44 +0800 Subject: [PATCH] mingxihua@huawei.com.cn Signed-off-by: m00512953 --- .../js/napi/ability_manager/js_ability_manager_utils.h | 6 +++--- frameworks/js/napi/js_mission_manager/mission_manager.cpp | 6 +++--- .../ability/native/ability_runtime/js_ability_context.cpp | 2 +- .../context/js_application_context_utils.cpp | 2 +- .../appkit/ability_runtime/context/js_context_utils.cpp | 6 +++--- .../native/ability/native/form_runtime/js_form_extension.h | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/frameworks/js/napi/ability_manager/js_ability_manager_utils.h b/frameworks/js/napi/ability_manager/js_ability_manager_utils.h index f46adad3f3..5cb33e46a1 100644 --- a/frameworks/js/napi/ability_manager/js_ability_manager_utils.h +++ b/frameworks/js/napi/ability_manager/js_ability_manager_utils.h @@ -13,14 +13,14 @@ * limitations under the License. */ +#ifndef OHOS_ABILITY_RUNTIME_JS_ABILITY_MANAGER_UTILS_H +#define OHOS_ABILITY_RUNTIME_JS_ABILITY_MANAGER_UTILS_H + #include "ability_running_info.h" #include "extension_running_info.h" #include "element_name.h" #include "native_engine/native_engine.h" -#ifndef OHOS_ABILITY_RUNTIME_JS_ABILITY_MANAGER_UTILS_H -#define OHOS_ABILITY_RUNTIME_JS_ABILITY_MANAGER_UTILS_H - namespace OHOS { namespace AbilityRuntime { NativeValue* CreateJsAbilityRunningInfoArray( diff --git a/frameworks/js/napi/js_mission_manager/mission_manager.cpp b/frameworks/js/napi/js_mission_manager/mission_manager.cpp index 0b431cdce1..8becaf3a69 100755 --- a/frameworks/js/napi/js_mission_manager/mission_manager.cpp +++ b/frameworks/js/napi/js_mission_manager/mission_manager.cpp @@ -522,18 +522,18 @@ private: } if (info.argv[0]->TypeOf() != NATIVE_STRING) { - HILOG_ERROR("Param 0 is not string"); + HILOG_ERROR("CheckOnOffType, Param 0 is not string"); return false; } std::string type; if (!ConvertFromJsValue(engine, info.argv[0], type)) { - HILOG_ERROR("Parse on off type failed"); + HILOG_ERROR("CheckOnOffType, Parse on off type failed"); return false; } if (type != ON_OFF_TYPE) { - HILOG_ERROR("args[0] should be mission."); + HILOG_ERROR("CheckOnOffType, args[0] should be mission."); return false; } return true; diff --git a/frameworks/native/ability/native/ability_runtime/js_ability_context.cpp b/frameworks/native/ability/native/ability_runtime/js_ability_context.cpp index a09328c2c2..aa071bb2e7 100644 --- a/frameworks/native/ability/native/ability_runtime/js_ability_context.cpp +++ b/frameworks/native/ability/native/ability_runtime/js_ability_context.cpp @@ -866,7 +866,7 @@ NativeValue* JsAbilityContext::OnDisconnectAbility(NativeEngine& engine, NativeC HILOG_INFO("OnDisconnectAbility begin"); auto context = weak.lock(); if (!context) { - HILOG_WARN("context is released"); + HILOG_WARN("OnDisconnectAbility context is released"); task.Reject(engine, CreateJsError(engine, AbilityErrorCode::ERROR_CODE_INVALID_CONTEXT)); return; } diff --git a/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp b/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp index 8918f65b6c..df36290ee3 100644 --- a/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp +++ b/frameworks/native/appkit/ability_runtime/context/js_application_context_utils.cpp @@ -265,7 +265,7 @@ NativeValue* JsApplicationContextUtils::OnCreateModuleContext(NativeEngine& engi auto contextObj = systemModule->Get(); NativeObject *nativeObj = ConvertNativeValueTo(contextObj); if (nativeObj == nullptr) { - HILOG_ERROR("Failed to get context native object"); + HILOG_ERROR("OnCreateModuleContext, Failed to get context native object"); AbilityRuntimeErrorUtil::Throw(engine, ERR_ABILITY_RUNTIME_EXTERNAL_INVALID_PARAMETER); return engine.CreateUndefined(); } diff --git a/frameworks/native/appkit/ability_runtime/context/js_context_utils.cpp b/frameworks/native/appkit/ability_runtime/context/js_context_utils.cpp index 9c282a4888..7f11531cef 100644 --- a/frameworks/native/appkit/ability_runtime/context/js_context_utils.cpp +++ b/frameworks/native/appkit/ability_runtime/context/js_context_utils.cpp @@ -225,7 +225,7 @@ NativeValue* JsBaseContext::OnCreateModuleContext(NativeEngine& engine, NativeCa auto contextObj = systemModule->Get(); NativeObject *nativeObj = ConvertNativeValueTo(contextObj); if (nativeObj == nullptr) { - HILOG_ERROR("Failed to get context native object"); + HILOG_ERROR("OnCreateModuleContext, Failed to get context native object"); AbilityRuntimeErrorUtil::Throw(engine, ERR_ABILITY_RUNTIME_EXTERNAL_INVALID_PARAMETER); return engine.CreateUndefined(); } @@ -424,7 +424,7 @@ NativeValue* JsBaseContext::OnCreateBundleContext(NativeEngine& engine, NativeCa auto contextObj = systemModule->Get(); NativeObject *nativeObj = ConvertNativeValueTo(contextObj); if (nativeObj == nullptr) { - HILOG_ERROR("Failed to get context native object"); + HILOG_ERROR("OnCreateBundleContext, Failed to get context native object"); AbilityRuntimeErrorUtil::Throw(engine, ERR_ABILITY_RUNTIME_EXTERNAL_INVALID_PARAMETER); return engine.CreateUndefined(); } @@ -466,7 +466,7 @@ NativeValue* JsBaseContext::OnGetApplicationContext(NativeEngine& engine, Native auto contextObj = systemModule->Get(); NativeObject *nativeObj = ConvertNativeValueTo(contextObj); if (nativeObj == nullptr) { - HILOG_ERROR("Failed to get context native object"); + HILOG_ERROR("OnGetApplicationContext, Failed to get context native object"); AbilityRuntimeErrorUtil::Throw(engine, ERR_ABILITY_RUNTIME_EXTERNAL_INVALID_PARAMETER); return engine.CreateUndefined(); } diff --git a/interfaces/kits/native/ability/native/form_runtime/js_form_extension.h b/interfaces/kits/native/ability/native/form_runtime/js_form_extension.h index d3d53e82a7..3e2deb20c5 100644 --- a/interfaces/kits/native/ability/native/form_runtime/js_form_extension.h +++ b/interfaces/kits/native/ability/native/form_runtime/js_form_extension.h @@ -63,7 +63,7 @@ public: bool OnShare(int64_t formId, AAFwk::WantParams &wantParams) override; private: - NativeValue* CallObjectMethod(const char* name, const char* bakName, NativeValue* const* argv = nullptr, + NativeValue* CallObjectMethod(const char* name, const char* bakName, NativeValue* const * argv = nullptr, size_t argc = 0); void BindContext(NativeEngine& engine, NativeObject* obj);