!3991 修复cpp crash

Merge pull request !3991 from slarkwayne/remote_bugfix1102
This commit is contained in:
openharmony_ci 2023-11-03 11:17:10 +00:00 committed by Gitee
commit 8e5f4f28a3
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 7 additions and 4 deletions

View File

@ -165,7 +165,7 @@ JsSceneSession::~JsSceneSession()
WLOGFE("session is nullptr"); WLOGFE("session is nullptr");
return; return;
} }
session->UnregisterSessionStateChangeListenser(); session->UnregisterSessionChangeListeners();
} }
void JsSceneSession::ProcessWindowDragHotAreaRegister() void JsSceneSession::ProcessWindowDragHotAreaRegister()

View File

@ -164,7 +164,7 @@ public:
WSError SetSessionIcon(const std::shared_ptr<Media::PixelMap> &icon); WSError SetSessionIcon(const std::shared_ptr<Media::PixelMap> &icon);
void SetUpdateSessionIconListener(const NofitySessionIconUpdatedFunc& func); void SetUpdateSessionIconListener(const NofitySessionIconUpdatedFunc& func);
void SetSessionStateChangeListenser(const NotifySessionStateChangeFunc& func); void SetSessionStateChangeListenser(const NotifySessionStateChangeFunc& func);
void UnregisterSessionStateChangeListenser(); void UnregisterSessionChangeListeners();
void SetSessionStateChangeNotifyManagerListener(const NotifySessionStateChangeNotifyManagerFunc& func); void SetSessionStateChangeNotifyManagerListener(const NotifySessionStateChangeNotifyManagerFunc& func);
void SetRequestFocusStatusNotifyManagerListener(const NotifyRequestFocusStatusNotifyManagerFunc& func); void SetRequestFocusStatusNotifyManagerListener(const NotifyRequestFocusStatusNotifyManagerFunc& func);
void SetNotifyUILostFocusFunc(const NotifyUILostFocusFunc& func); void SetNotifyUILostFocusFunc(const NotifyUILostFocusFunc& func);

View File

@ -1345,10 +1345,13 @@ void Session::SetSessionStateChangeListenser(const NotifySessionStateChangeFunc&
WLOGFD("SetSessionStateChangeListenser, id: %{public}d", GetPersistentId()); WLOGFD("SetSessionStateChangeListenser, id: %{public}d", GetPersistentId());
} }
void Session::UnregisterSessionStateChangeListenser() void Session::UnregisterSessionChangeListeners()
{ {
sessionStateChangeFunc_ = nullptr; sessionStateChangeFunc_ = nullptr;
WLOGFD("UnregisterSessionStateChangeListenser, id: %{public}d", GetPersistentId()); sessionFocusableChangeFunc_ = nullptr;
sessionTouchableChangeFunc_ = nullptr;
clickFunc_ = nullptr;
WLOGFD("UnregisterSessionChangeListenser, id: %{public}d", GetPersistentId());
} }
void Session::SetSessionStateChangeNotifyManagerListener(const NotifySessionStateChangeNotifyManagerFunc& func) void Session::SetSessionStateChangeNotifyManagerListener(const NotifySessionStateChangeNotifyManagerFunc& func)