From 6bf5f082dc57e4320f8bad65db28ed2249bcd3fb Mon Sep 17 00:00:00 2001 From: daiyujia Date: Tue, 9 Sep 2025 20:27:39 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:#ICX78B=20Description:=E5=91=8A?= =?UTF-8?q?=E8=AD=A6=E4=BF=AE=E5=A4=8D=20Sig:bundleManager=20Feature=20or?= =?UTF-8?q?=20Bugfix:Bugfix=20Binary=20Source:No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: daiyujia Change-Id: Id94b76bc1e8ac50c993e1b042bf6898b4ebcf0e2 --- .../inner_api/appexecfwk_base/src/form_info.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/interfaces/inner_api/appexecfwk_base/src/form_info.cpp b/interfaces/inner_api/appexecfwk_base/src/form_info.cpp index 804da053bc..93112c00e6 100644 --- a/interfaces/inner_api/appexecfwk_base/src/form_info.cpp +++ b/interfaces/inner_api/appexecfwk_base/src/form_info.cpp @@ -294,12 +294,12 @@ bool FormInfo::ReadFromParcel(Parcel &parcel) FormInfo *FormInfo::Unmarshalling(Parcel &parcel) { - std::unique_ptr info = std::make_unique(); - if (!info->ReadFromParcel(parcel)) { + FormInfo *info = new (std::nothrow) FormInfo(); + if (info && !info->ReadFromParcel(parcel)) { APP_LOGW("read from parcel failed"); info = nullptr; } - return info.release(); + return info; } bool FormInfo::Marshalling(Parcel &parcel) const @@ -421,15 +421,15 @@ void to_json(nlohmann::json &jsonObject, const FormWindow &formWindow) void to_json(nlohmann::json &jsonObject, const FormFunInteractionParams &funInteractionParams) { - jsonObject[JSON_KEY_ABILITY_NAME] = funInteractionParams.abilityName, - jsonObject[JSON_KEY_TARGET_BUNDLE_NAME] = funInteractionParams.targetBundleName, - jsonObject[JSON_KEY_SUB_BUNDLE_NAME] = funInteractionParams.subBundleName, + jsonObject[JSON_KEY_ABILITY_NAME] = funInteractionParams.abilityName; + jsonObject[JSON_KEY_TARGET_BUNDLE_NAME] = funInteractionParams.targetBundleName; + jsonObject[JSON_KEY_SUB_BUNDLE_NAME] = funInteractionParams.subBundleName; jsonObject[JSON_KEY_KEEP_STATE_DURATION] = funInteractionParams.keepStateDuration; } void to_json(nlohmann::json &jsonObject, const FormSceneAnimationParams &sceneAnimationParams) { - jsonObject[JSON_KEY_ABILITY_NAME] = sceneAnimationParams.abilityName, + jsonObject[JSON_KEY_ABILITY_NAME] = sceneAnimationParams.abilityName; jsonObject[JSON_KEY_DISABLED_DESKTOP_BEHAVIORS] = sceneAnimationParams.disabledDesktopBehaviors; } -- Gitee