mirror of
https://github.com/openharmony/ability_ability_runtime.git
synced 2026-08-24 12:43:16 -04:00
!19815 merge cfipac into master
Add cfi/pac config Created-by: zivzhen Commit-by: wangzhen Merged-by: openharmony_ci Description: **IssueNo**: **Description**: **稳定性自检:** | 自检项 | 自检结果 | | ------------------------------------------------------------ | -------- | | 涉及跨进程调用的相关操作需要抛至主线程或加锁防止并发 | ok | | 成员变量进行赋值或创建需要排查并发 | ok | | 谨慎在lambda表达式中使用引用捕获 | ok | | 谨慎在未经拷贝的情况下使用外部传入的string、C字符串 | ok | | map\vector\list\set等stl模板类使用时需要排查并发 | ok | | 谨慎考虑加锁范围 | ok | | 在IPC通信中谨慎使用同步通信方式 | ok | | 禁止传递this指针至其他模块或线程(特别是eventhandler任务) | ok | | 禁止将外部传入的裸指针在内部直接构造智能指针 | ok | | 禁止多个独立创建的智能指针管理同一地址 | ok | | 禁止在析构函数中抛异步任务 | ok | | 禁止js对象在非js线程(例如在IPC线程)创建、使用或销毁 | ok | | 禁止在对外接口中未经判空直接使用外部传入的指针 | ok | | 禁止接口返回局部变量引用 | ok | | 禁止在信号函数中加锁 | ok | | 禁止在关键流程(SA启动、应用启动等主流程)执行耗时的操作 | ok | | 禁止将同一个cpp编译在不同的so中 | ok | **安全编码自检:** | 自检项 | 自检结果 | | -------------------------------------------------------------- | -------- | | 裸指针避免通过隐式转换构造为sptr | ok | | json对象在取值之前必须先判断类型,避免类型不匹配 | ok | | 序列化时必须对传入的数组大小进行校验,避免出现超大数组 | ok | | 避免使用未明确位宽的整型,选择使用int8_t、uint8_t等类型 | ok | | 外部传入的路径要做规范化校验,对路径中的.、..、../等特殊字符严格校验 | ok | | 指针变量、表示资源描述符的变量、bool变量必须赋初值 | ok | | readParcelable获取的对象使用前需要判空 | ok | | 分配和释放内存的函数需要成对出现 | ok | | 申请内存后异常退出前需要及时进行内存释放 | ok | | 内存申请前必须对内存大小进行合法性校验 | ok | | 内存分配后必须判断是否成功 | ok | | 禁止使用realloc、alloca函数 | ok | | 禁止打印文件路径、口令等敏感信息,如有需要,使用private修饰 | ok | | 禁止打印内存地址 | ok | | 整数之间运算时必须严格检查,确保不会出现溢出、反转、除0 | ok | | 禁止对有符号整数进行位操作符运算 | ok | | 禁止对指针进行逻辑或位运算 | ok | | 循环次数如果收外部数据控制,需要检验其合法性 | ok | | 禁止使用内存操作类危险函数,需要使用安全函数 | ok | | 谨慎使用不可重入函数 | ok | | 必须检查安全函数的返回值,并进行正确处理 | ok | | 禁止仅通过TokenType类型判断绕过权限校验 | ok | **TDD Result**: pass **XTS Result**: pass ### 是否已执行L0用例 - [ ] 已验证 - [ ] 不涉及。如不涉及,请写明理由 See merge request: openharmony/ability_ability_runtime!19815
This commit is contained in:
@@ -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 = [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -21,6 +21,8 @@ gen_js_src_binary("ability") {
|
||||
}
|
||||
|
||||
ohos_shared_library("uiability") {
|
||||
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("wantconstant_napi") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [
|
||||
"${ability_runtime_napi_path}/wantConstant/native_module.cpp",
|
||||
"${ability_runtime_napi_path}/wantConstant/want_constant.cpp",
|
||||
|
||||
@@ -22,6 +22,8 @@ config("simulator_osal_public_config") {
|
||||
}
|
||||
|
||||
ohos_source_set("simulator_osal") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = []
|
||||
|
||||
public_configs = [ ":simulator_osal_public_config" ]
|
||||
|
||||
@@ -15,6 +15,8 @@ import("//build/ohos.gni")
|
||||
import("//foundation/ability/ability_runtime/ability_runtime.gni")
|
||||
|
||||
ohos_executable("ability_simulator_test") {
|
||||
branch_protector_ret = "pac_ret"
|
||||
|
||||
sources = [ "src/main.cpp" ]
|
||||
|
||||
deps = [ "${ability_runtime_path}/frameworks/simulator/ability_simulator:ability_simulator" ]
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user