mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
Merge branch 'master' of https://gitcode.com/Luobniz21/ability_ability_runtime
This commit is contained in:
@@ -56,3 +56,6 @@
|
||||
### 是否已执行L0用例
|
||||
- [ ] 已验证
|
||||
- [ ] 不涉及。如不涉及,请写明理由
|
||||
|
||||
### AI检视评分(使用本地代码检视skills扫描):
|
||||
|
||||
|
||||
@@ -51,6 +51,8 @@ ohos_shared_library("js_agent_manager_utils") {
|
||||
}
|
||||
|
||||
ohos_shared_library("agentmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
|
||||
@@ -16,6 +16,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("agent_fwk") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -50,6 +52,8 @@ ohos_shared_library("agent_fwk") {
|
||||
}
|
||||
|
||||
ohos_shared_library("agent_connection_manager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -114,6 +118,8 @@ config("agent_manager_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("agent_manager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
|
||||
@@ -20,6 +20,7 @@ ohos_source_set("cli_manager_error_utils_src") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
@@ -51,6 +52,7 @@ ohos_source_set("js_cli_event_handler_manager_src") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
@@ -75,6 +77,7 @@ ohos_shared_library("climanager_napi") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
||||
@@ -20,6 +20,7 @@ ohos_shared_library("functionmanager_napi") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
||||
@@ -20,6 +20,7 @@ ohos_shared_library("scriptmanager_napi") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
||||
@@ -47,6 +47,7 @@ ohos_shared_library("cli_tool_client") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
public_configs = [ ":cli_tool_client_config" ]
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@ ohos_source_set("function_info") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
public_configs = [ ":function_info_config" ]
|
||||
|
||||
|
||||
@@ -36,6 +36,7 @@ ohos_shared_library("climgr") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
shlib_type = "sa"
|
||||
configs = [ ":clisa_config" ]
|
||||
include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/ability_bundle_manager_helper" ]
|
||||
|
||||
@@ -20,6 +20,7 @@ ohos_source_set("cli_common") {
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"include",
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("cli_event_reply_manager_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -1,57 +1,62 @@
|
||||
# Copyright (c) 2026 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("cli_event_report_test") {
|
||||
module_out_path = module_output_path
|
||||
|
||||
sources = [
|
||||
"cli_event_report_test.cpp",
|
||||
"${cli_tool_framework_path}/services/common/src/cli_event_report.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include/appmgr",
|
||||
"${cli_tool_framework_path}/services/common/include",
|
||||
"${cli_tool_framework_path}/interfaces/cli_tool/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
|
||||
"${ability_runtime_services_path}/common:hisysevent_report_static",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:want",
|
||||
"access_token:libaccesstoken_sdk",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"c_utils:utils",
|
||||
"googletest:gmock_main",
|
||||
"googletest:gtest_main",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
|
||||
defines = [ "AMS_LOG_TAG = \"CliEventReportTest\"" ]
|
||||
}
|
||||
|
||||
group("unittest") {
|
||||
testonly = true
|
||||
deps = [ ":cli_event_report_test" ]
|
||||
}
|
||||
# Copyright (c) 2026 Huawei Device Co., Ltd.
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import("//build/test.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("cli_event_report_test") {
|
||||
module_out_path = module_output_path
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
sources = [
|
||||
"cli_event_report_test.cpp",
|
||||
"${cli_tool_framework_path}/services/common/src/cli_event_report.cpp",
|
||||
]
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include/appmgr",
|
||||
"${cli_tool_framework_path}/services/common/include",
|
||||
"${cli_tool_framework_path}/interfaces/cli_tool/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"${ability_runtime_innerkits_path}/ability_manager:ability_manager",
|
||||
"${ability_runtime_services_path}/common:hisysevent_report_static",
|
||||
]
|
||||
|
||||
external_deps = [
|
||||
"ability_base:want",
|
||||
"access_token:libaccesstoken_sdk",
|
||||
"bundle_framework:appexecfwk_base",
|
||||
"c_utils:utils",
|
||||
"googletest:gmock_main",
|
||||
"googletest:gtest_main",
|
||||
"hilog:libhilog",
|
||||
"hisysevent:libhisysevent",
|
||||
"ipc:ipc_core",
|
||||
]
|
||||
|
||||
defines = [ "AMS_LOG_TAG = \"CliEventReportTest\"" ]
|
||||
}
|
||||
|
||||
group("unittest") {
|
||||
testonly = true
|
||||
deps = [ ":cli_event_report_test" ]
|
||||
}
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("cli_tool_mgr_client_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("cli_tool_mgr_service_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("function_info_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [ "${cli_tool_framework_path}/interfaces/function/include" ]
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("invoke_function_executor_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
# "mock/include" MUST come before the real interfaces/cli_tool/include so the
|
||||
|
||||
@@ -17,6 +17,13 @@ import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
module_output_path = "ability_runtime/ability_runtime/clitool"
|
||||
|
||||
ohos_unittest("process_manager_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
module_out_path = module_output_path
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("ark_interop_helper_ffi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
defines = []
|
||||
|
||||
sources = [ "ark_interop_helper.cpp" ]
|
||||
|
||||
@@ -16,6 +16,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("share_extension_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ability_data_uri_utils_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("datauriutils") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_data_uri_utils_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("autostartupcallback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"./",
|
||||
"${ability_runtime_napi_path}/inner/napi_common/",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("autostartupmanager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_napi_path}/ability_auto_startup_callback",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("abilityconstant_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
@@ -41,6 +43,8 @@ ohos_shared_library("abilityconstant_napi") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilityconstant") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ability_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitycontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_context_module.cpp" ]
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -25,9 +25,22 @@ namespace AbilityRuntime {
|
||||
using namespace OHOS::AppExecFwk;
|
||||
JsPreloadUIExtensionCallbackClient::~JsPreloadUIExtensionCallbackClient()
|
||||
{
|
||||
if (callbackRef_ != nullptr) {
|
||||
napi_delete_reference(env_, callbackRef_);
|
||||
callbackRef_ = nullptr;
|
||||
if (callbackRef_ == nullptr || env_ == nullptr) {
|
||||
return;
|
||||
}
|
||||
napi_env env = env_;
|
||||
napi_ref ref = callbackRef_;
|
||||
callbackRef_ = nullptr;
|
||||
auto deleteTask = [env, ref]() {
|
||||
napi_status status = napi_delete_reference(env, ref);
|
||||
if (status != napi_ok) {
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "napi_delete_reference failed: %{public}d", status);
|
||||
}
|
||||
};
|
||||
if (napi_send_event(env, deleteTask, napi_eprio_high) != napi_ok) {
|
||||
// Never call napi_delete_reference on the current (Binder) thread; if the JS event loop is
|
||||
// unavailable, leak the reference rather than risk a cross-thread N-API call.
|
||||
TAG_LOGE(AAFwkTag::ABILITYMGR, "napi_send_event failed, skip cross-thread reference release");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("verticalpanelmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("action_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("actionextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "action_extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ability_lifecycle_callback_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitylifecyclecallback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_lifecycle_callback_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ability_stage_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitystage") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_stage_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
@@ -52,6 +54,8 @@ ohos_shared_library("abilitystage") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitystage_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_stage_napi_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ability_stage_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitystagecontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ability_stage_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("appmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
if (ability_runtime_graphics) {
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("application_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("applicationcontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "application_context_module.cpp" ]
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -37,6 +37,8 @@ gen_js_obj("application_state_change_callback_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("applicationstatechangecallback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "application_state_change_callback_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -34,6 +34,8 @@ gen_js_obj("context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("context_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "context_module.cpp" ]
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("environment_callback_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("environmentcallback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "environment_callback_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("appmanager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = ["${ability_runtime_utils_path}/global/common/include"]
|
||||
|
||||
if (ability_runtime_graphics) {
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("test_runner_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("testrunner_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "test_runner_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("contextconstant_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
sources = [ "application_context_constant_module.cpp" ]
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("auto_fill_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("autofillextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "auto_fill_extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("auto_fill_extension_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("autofillextensioncontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "auto_fill_extension_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("autofillmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"auto_fill_manager_module.cpp",
|
||||
"js_auto_fill_manager.cpp",
|
||||
|
||||
@@ -34,6 +34,8 @@ gen_js_obj("callee_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("callee_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "callee_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -34,6 +34,8 @@ gen_js_obj("caller_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("caller_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "caller_module.cpp" ]
|
||||
|
||||
cflags = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("completionhandlerforabilitystartcallback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("completionhandlerforatomicservice") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
import("//build/ohos.gni")
|
||||
|
||||
ohos_shared_library("configurationconstant_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
sources = [ "configuration_constant_napi_module.cpp" ]
|
||||
@@ -34,6 +36,8 @@ ohos_shared_library("configurationconstant_napi") {
|
||||
}
|
||||
|
||||
ohos_shared_library("configurationconstant") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
sources = [ "configuration_constant_module.cpp" ]
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("embeddable_ui_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("embeddableuiability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "embeddable_ui_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -36,6 +36,8 @@ gen_js_obj("embeddable_ui_ability_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("embeddableuiabilitycontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "embeddable_ui_ability_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("errorcode_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
]
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("extensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("extension_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("extensioncontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "extension_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("featureability") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [ "${ability_runtime_services_path}/common:optimize_config" ]
|
||||
|
||||
include_dirs = [ "./" ]
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("featureability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
sources = [
|
||||
|
||||
@@ -19,6 +19,8 @@ config("napi_ability_common_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("napi_ability_common") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
public_configs = [
|
||||
":napi_ability_common_public_config",
|
||||
"${ability_runtime_native_path}/ability/native:ability_public_config",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("insightintent_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_insight_intent.cpp",
|
||||
"native_module.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("insightintentdecorator_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_insight_intent_decorator.cpp",
|
||||
"native_module.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("insightintentdriver_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_insight_intent_driver.cpp",
|
||||
"js_insight_intent_driver_utils.cpp",
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("insight_intent_executor_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("insightintentexecutor_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "insight_intent_executor_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("insightintentprovider_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("insight_intent_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("insightintentcontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "insight_intent_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("child_process_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("childprocess_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "native_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("childprocessmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = []
|
||||
|
||||
configs = [
|
||||
|
||||
@@ -19,6 +19,8 @@ config("dialog_request_external_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("dialogrequest_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_dialog_request.cpp",
|
||||
"js_dialog_request_callback.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("dialogsession_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_dialog_session.cpp",
|
||||
"js_dialog_session_utils.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("missionmanager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_mission_info_utils.cpp",
|
||||
"js_mission_listener.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("missionmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_mission_info_utils.cpp",
|
||||
"js_mission_listener.cpp",
|
||||
@@ -75,6 +77,8 @@ ohos_shared_library("missionmanager_napi") {
|
||||
}
|
||||
|
||||
ohos_shared_library("distributedmissionmanager") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = []
|
||||
|
||||
configs = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("particleability") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_napi_path}/featureAbility",
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
|
||||
@@ -36,6 +36,8 @@ gen_js_obj("photo_editor_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("photoeditorextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -36,6 +36,8 @@ gen_js_obj("photo_editor_extension_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("photoeditorextensioncontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("quickfixmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_application_quick_fix_info.cpp",
|
||||
"js_quick_fix_manager.cpp",
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("service_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("serviceextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "service_extension_ability_napi_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
@@ -50,6 +52,8 @@ ohos_shared_library("serviceextensionability_napi") {
|
||||
}
|
||||
|
||||
ohos_shared_library("serviceextensionability") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "service_extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("service_extension_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("serviceextensioncontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "service_extension_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("share_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("shareextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "share_extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ui_extension_ability_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("uiextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ui_extension_ability_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -35,6 +35,8 @@ gen_js_obj("ui_extension_context_abc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("uiextensioncontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "ui_extension_context_module.cpp" ]
|
||||
|
||||
deps = [
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
ohos_shared_library("uripermissionmanager_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"js_uri_perm_mgr.cpp",
|
||||
"native_module.cpp",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("wantconstant") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [ "${ability_runtime_services_path}/common/include" ]
|
||||
|
||||
sources = [
|
||||
@@ -41,6 +43,8 @@ ohos_shared_library("wantconstant") {
|
||||
}
|
||||
|
||||
ohos_shared_library("wantconstant_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [ "${ability_runtime_services_path}/common/include" ]
|
||||
|
||||
sources = [
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("wantagent") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_services_path}/common/include",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime",
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("wantagent_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [ "${ability_runtime_services_path}/common:optimize_config" ]
|
||||
|
||||
include_dirs = [
|
||||
|
||||
@@ -464,13 +464,7 @@ void CallerConnection::OnRemoteStateChanged(const AppExecFwk::ElementName &eleme
|
||||
int32_t LocalCallContainer::GetCurrentUserId()
|
||||
{
|
||||
if (currentUserId_ == DEFAULT_INVAL_VALUE) {
|
||||
auto osAccount = DelayedSingleton<AppExecFwk::OsAccountManagerWrapper>::GetInstance();
|
||||
if (osAccount == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::LOCAL_CALL, "null osAccount");
|
||||
return DEFAULT_INVAL_VALUE;
|
||||
}
|
||||
|
||||
osAccount->GetOsAccountLocalIdFromProcess(currentUserId_);
|
||||
AppExecFwk::OsAccountManagerWrapper::GetOsAccountLocalIdFromProcess(currentUserId_);
|
||||
}
|
||||
TAG_LOGD(AAFwkTag::LOCAL_CALL, "currentUserId %{public}d", currentUserId_);
|
||||
return currentUserId_;
|
||||
|
||||
@@ -641,6 +641,8 @@ config("extensionkit_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("extensionkit_native") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
defines = [ "AMS_LOG_TAG = \"Ability\"" ]
|
||||
defines += [ "AMS_LOG_DOMAIN = 0xD001300" ]
|
||||
include_dirs = [
|
||||
@@ -721,6 +723,8 @@ ohos_shared_library("extensionkit_native") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_extensionkit_native") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -793,6 +797,8 @@ config("insight_intent_executor_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("insight_intent_executor") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"${ability_runtime_native_path}/ability/native/insight_intent_executor/ets_insight_intent_executor_instance.cpp",
|
||||
"${ability_runtime_native_path}/ability/native/insight_intent_executor/insight_intent_delay_result_callback_mgr.cpp",
|
||||
@@ -849,6 +855,8 @@ ohos_shared_library("insight_intent_executor") {
|
||||
}
|
||||
|
||||
ohos_shared_library("insight_intent_executor_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -916,6 +924,8 @@ ohos_shared_library("insight_intent_executor_ani") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_insight_intent_executor") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -1124,6 +1134,8 @@ ohos_shared_library("ui_ability_ani") {
|
||||
}
|
||||
|
||||
ohos_shared_library("uiabilitykit_native") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native",
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/ability_runtime",
|
||||
@@ -1263,6 +1275,8 @@ ohos_shared_library("uiabilitykit_native") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ability_thread") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [ "${ability_runtime_services_path}/common:optimize_config" ]
|
||||
|
||||
include_dirs = [
|
||||
@@ -1332,6 +1346,8 @@ ohos_shared_library("ability_thread") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ets_form_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -1413,6 +1429,8 @@ ohos_shared_library("ets_form_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("form_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
defines = [ "AMS_LOG_TAG = \"Ability\"" ]
|
||||
defines += [ "AMS_LOG_DOMAIN = 0xD001300" ]
|
||||
if (ability_runtime_graphics) {
|
||||
@@ -1484,6 +1502,8 @@ ohos_shared_library("form_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_form_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -1554,6 +1574,8 @@ ohos_shared_library("cj_form_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("form_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/inner_api/ability_manager/include",
|
||||
"${ability_runtime_path}/interfaces/inner_api/runtime/include",
|
||||
@@ -1603,6 +1625,8 @@ ohos_shared_library("form_extension_module") {
|
||||
}
|
||||
|
||||
ohos_shared_library("service_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [ "${ability_runtime_services_path}/common:optimize_config" ]
|
||||
|
||||
defines = [ "AMS_LOG_TAG = \"Ability\"" ]
|
||||
@@ -1757,6 +1781,8 @@ ohos_shared_library("app_service_extension_ani") {
|
||||
}
|
||||
|
||||
ohos_shared_library("service_extension_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -2307,6 +2333,8 @@ ohos_shared_library("continuation_ipc") {
|
||||
}
|
||||
|
||||
ohos_shared_library("data_ability_helper") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs =
|
||||
[ "${ability_runtime_path}/interfaces/kits/native/ability/native" ]
|
||||
|
||||
@@ -2360,6 +2388,8 @@ ohos_shared_library("data_ability_helper") {
|
||||
}
|
||||
|
||||
ohos_shared_library("service_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/inner_api/ability_manager/include",
|
||||
"${ability_runtime_path}/interfaces/inner_api/runtime/include",
|
||||
@@ -2427,6 +2457,12 @@ config("ability_business_error_public_config") {
|
||||
ohos_shared_library("ability_business_error") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
sources = [ "${ability_runtime_native_path}/ability/native/ability_business_error/ability_business_error.cpp" ]
|
||||
|
||||
configs = [ ":ability_business_error_config" ]
|
||||
@@ -2535,6 +2571,8 @@ config("ui_extension_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ui_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_path}/interfaces/kits/native/ability/native/ui_service_extension_ability/connection",
|
||||
"${ability_runtime_path}/frameworks/ets/ani/ui_extension_ability/include",
|
||||
@@ -2614,6 +2652,8 @@ ohos_shared_library("ui_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("photo_editor_extension_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -2714,6 +2754,8 @@ config("ui_extension_ani_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ui_extension_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -2813,6 +2855,8 @@ ohos_shared_library("ui_extension_ani") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_ui_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -2890,6 +2934,8 @@ ohos_shared_library("cj_ui_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ui_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/ability/native/ui_extension_ability" ]
|
||||
|
||||
sources = [ "${ability_runtime_native_path}/ability/native/ui_extension_ability/ui_extension_module_loader.cpp" ]
|
||||
@@ -2944,6 +2990,8 @@ config("share_extension_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("share_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [
|
||||
":share_extension_config",
|
||||
"${ability_runtime_services_path}/common:optimize_config",
|
||||
@@ -2996,6 +3044,8 @@ ohos_shared_library("share_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_share_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -3058,6 +3108,8 @@ config("action_extension_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("action_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
configs = [
|
||||
":action_extension_config",
|
||||
"${ability_runtime_services_path}/common:optimize_config",
|
||||
@@ -3110,6 +3162,8 @@ ohos_shared_library("action_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_action_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -3159,6 +3213,8 @@ ohos_shared_library("cj_action_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("share_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "${ability_runtime_native_path}/ability/native/share_extension_ability/share_extension_module_loader.cpp" ]
|
||||
|
||||
configs = [
|
||||
@@ -3204,6 +3260,12 @@ ohos_shared_library("share_extension_module") {
|
||||
ohos_shared_library("auto_startup_callback") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/ability/native/ability_business_error" ]
|
||||
|
||||
sources = [
|
||||
@@ -3229,6 +3291,8 @@ ohos_shared_library("auto_startup_callback") {
|
||||
}
|
||||
|
||||
ohos_shared_library("action_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "${ability_runtime_native_path}/ability/native/action_extension_ability/action_extension_module_loader.cpp" ]
|
||||
|
||||
configs = [
|
||||
@@ -3520,6 +3584,8 @@ config("auto_fill_extension_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("auto_fill_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
public_configs = [ ":auto_fill_extension_config" ]
|
||||
|
||||
configs = [ "${ability_runtime_services_path}/common:optimize_config" ]
|
||||
@@ -3653,6 +3719,8 @@ ohos_shared_library("auto_fill_extension_ani") {
|
||||
}
|
||||
|
||||
ohos_shared_library("auto_fill_extension_util") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -3687,6 +3755,8 @@ ohos_shared_library("auto_fill_extension_util") {
|
||||
}
|
||||
|
||||
ohos_shared_library("auto_fill_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "${ability_runtime_native_path}/ability/native/auto_fill_extension_ability/auto_fill_extension_module_loader.cpp" ]
|
||||
|
||||
configs = [
|
||||
@@ -3745,6 +3815,8 @@ config("photo_editor_extension_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("photo_editor_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -3811,6 +3883,8 @@ ohos_shared_library("photo_editor_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_photo_editor_extension") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
@@ -3871,6 +3945,8 @@ ohos_shared_library("cj_photo_editor_extension") {
|
||||
}
|
||||
|
||||
ohos_shared_library("photo_editor_extension_module") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -75,6 +75,8 @@ config("appkit_public_config") {
|
||||
|
||||
# build so
|
||||
ohos_shared_library("appkit_native") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"native",
|
||||
"${ability_runtime_path}/ets_environment/interfaces/inner_api",
|
||||
@@ -353,6 +355,8 @@ ohos_shared_library("appkit_native") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ability_stage_ani") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
@@ -784,6 +788,12 @@ config("application_context_manager_config") {
|
||||
ohos_shared_library("appkit_manager_helper") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
cfi = true
|
||||
cfi_cross_dso = true
|
||||
debug = false
|
||||
}
|
||||
|
||||
include_dirs = [
|
||||
"native",
|
||||
"${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app",
|
||||
|
||||
@@ -839,12 +839,7 @@ int ContextImpl::GetCurrentAccountId() const
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
int userId = 0;
|
||||
auto instance = DelayedSingleton<AppExecFwk::OsAccountManagerWrapper>::GetInstance();
|
||||
if (instance == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "null instance");
|
||||
return userId;
|
||||
}
|
||||
instance->GetOsAccountLocalIdFromProcess(userId);
|
||||
AppExecFwk::OsAccountManagerWrapper::GetOsAccountLocalIdFromProcess(userId);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "userId: %{public}d", userId);
|
||||
return userId;
|
||||
}
|
||||
@@ -853,12 +848,7 @@ int ContextImpl::GetCurrentActiveAccountId() const
|
||||
{
|
||||
HITRACE_METER_NAME(HITRACE_TAG_ABILITY_MANAGER, __PRETTY_FUNCTION__);
|
||||
std::vector<int> accountIds;
|
||||
auto instance = DelayedSingleton<AppExecFwk::OsAccountManagerWrapper>::GetInstance();
|
||||
if (instance == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "null instance");
|
||||
return 0;
|
||||
}
|
||||
ErrCode ret = instance->QueryActiveOsAccountIds(accountIds);
|
||||
ErrCode ret = AppExecFwk::OsAccountManagerWrapper::QueryActiveOsAccountIds(accountIds);
|
||||
if (ret != ERR_OK) {
|
||||
TAG_LOGE(AAFwkTag::APPKIT, "ContextImpl::GetCurrentActiveAccountId error. ret: %{public}d", ret);
|
||||
return 0;
|
||||
|
||||
@@ -236,7 +236,7 @@ bool ContextDeal::IsCreateBySystemApp() const
|
||||
int ContextDeal::GetCurrentAccountId() const
|
||||
{
|
||||
int userId = 0;
|
||||
DelayedSingleton<OsAccountManagerWrapper>::GetInstance()->GetOsAccountLocalIdFromProcess(userId);
|
||||
OsAccountManagerWrapper::GetOsAccountLocalIdFromProcess(userId);
|
||||
TAG_LOGD(AAFwkTag::APPKIT, "userId: %{public}d", userId);
|
||||
return userId;
|
||||
}
|
||||
|
||||
@@ -22,6 +22,8 @@ config("insight_intent_context_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("insightintentcontext") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"insight_intent_context.cpp",
|
||||
"js_insight_intent_context.cpp",
|
||||
@@ -58,6 +60,8 @@ ohos_shared_library("insightintentcontext") {
|
||||
}
|
||||
|
||||
ohos_shared_library("cj_insightintentcontext") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sanitize = {
|
||||
integer_overflow = true
|
||||
ubsan = true
|
||||
|
||||
@@ -1155,7 +1155,11 @@ std::unique_ptr<NativeReference> JsRuntime::LoadModule(const std::string& module
|
||||
}
|
||||
|
||||
napi_ref tmpRef = nullptr;
|
||||
napi_create_reference(env, classValue, 1, &tmpRef);
|
||||
napi_status status = napi_create_reference(env, classValue, 1, &tmpRef);
|
||||
if (status != napi_ok || tmpRef == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSRUNTIME, "create reference failed");
|
||||
return std::unique_ptr<NativeReference>();
|
||||
}
|
||||
modules_.emplace(modulePath, reinterpret_cast<NativeReference*>(tmpRef));
|
||||
}
|
||||
|
||||
@@ -1180,6 +1184,11 @@ std::unique_ptr<NativeReference> JsRuntime::LoadSystemModule(
|
||||
|
||||
HandleScope handleScope(*this);
|
||||
|
||||
if (methodRequireNapiRef_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSRUNTIME, "null methodRequireNapiRef_");
|
||||
return std::unique_ptr<NativeReference>();
|
||||
}
|
||||
|
||||
napi_value className = nullptr;
|
||||
napi_create_string_utf8(env, moduleName.c_str(), moduleName.length(), &className);
|
||||
napi_value globalObj = nullptr;
|
||||
@@ -1554,6 +1563,10 @@ void JsRuntime::PreloadSystemModule(const std::string& moduleName)
|
||||
HandleScope handleScope(*this);
|
||||
auto env = GetNapiEnv();
|
||||
CHECK_POINTER(env);
|
||||
if (methodRequireNapiRef_ == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSRUNTIME, "null methodRequireNapiRef_");
|
||||
return;
|
||||
}
|
||||
napi_value className = nullptr;
|
||||
napi_create_string_utf8(env, moduleName.c_str(), moduleName.length(), &className);
|
||||
napi_value globalObj = nullptr;
|
||||
|
||||
@@ -507,6 +507,12 @@ void ReleaseNativeReference(napi_env env, NativeReference* ref)
|
||||
TAG_LOGD(AAFwkTag::JSRUNTIME, "null ref");
|
||||
return;
|
||||
}
|
||||
if (env == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSRUNTIME, "null env");
|
||||
delete ref;
|
||||
return;
|
||||
}
|
||||
|
||||
uv_work_t *work = new (std::nothrow) uv_work_t;
|
||||
if (work == nullptr) {
|
||||
TAG_LOGE(AAFwkTag::JSRUNTIME, "null work");
|
||||
|
||||
@@ -21,6 +21,8 @@ config("ability_simulator_public_config") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ability_simulator_inner") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw || is_mac) {
|
||||
defines = []
|
||||
if (is_mingw) {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("ability") {
|
||||
}
|
||||
|
||||
ohos_shared_library("ability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("abilityconstant") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include",
|
||||
"${ability_runtime_innerkits_path}/ability_manager/include/continuation",
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("ability_context") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitycontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("ability_stage") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitystage") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("ability_stage_context") {
|
||||
}
|
||||
|
||||
ohos_shared_library("abilitystagecontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("application_context") {
|
||||
}
|
||||
|
||||
ohos_shared_library("applicationcontext_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("callee") {
|
||||
}
|
||||
|
||||
ohos_shared_library("callee") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("caller") {
|
||||
}
|
||||
|
||||
ohos_shared_library("caller_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_shared_library("configurationconstant") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
include_dirs = [ "${resource_management_path}/interfaces/inner_api/include" ]
|
||||
|
||||
sources = [ "${ability_runtime_napi_path}/configuration_constant/configuration_constant_module.cpp" ]
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("context") {
|
||||
}
|
||||
|
||||
ohos_shared_library("context_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -20,6 +20,8 @@ gen_js_src_binary("embeddable_ui_ability") {
|
||||
}
|
||||
|
||||
ohos_shared_library("embeddableuiability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
@@ -20,6 +20,8 @@ gen_js_src_binary("embeddable_ui_ability_context") {
|
||||
}
|
||||
|
||||
ohos_shared_library("embeddeduiextensionability_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
if (is_mingw) {
|
||||
defines = [ "WINDOWS_PLATFORM" ]
|
||||
} else {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user