mirror of
https://gitee.com/openharmony/accessibility
synced 2024-11-27 09:01:34 +00:00
fix review problem
Signed-off-by: Mupceet <laiguizhong@huawei.com>
This commit is contained in:
parent
2b231e1609
commit
190e405550
@ -678,10 +678,10 @@ void EnableAbilityListsObserverImpl::UnsubscribeObserver(napi_env env, napi_valu
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
for (auto iter = enableAbilityListsObservers_.begin(); iter != enableAbilityListsObservers_.end();) {
|
||||
if (env != (*iter)->env_) {
|
||||
HILOG_WARN("Not same env");
|
||||
iter++;
|
||||
continue;
|
||||
}
|
||||
HILOG_DEBUG("Same env, begin check observer equal");
|
||||
napi_value item = nullptr;
|
||||
napi_status status;
|
||||
bool equalFlag = false;
|
||||
|
@ -441,10 +441,10 @@ void NAccessibilityConfigObserverImpl::UnsubscribeObserver(napi_env env,
|
||||
for (auto iter = observers_.begin(); iter != observers_.end();) {
|
||||
if ((*iter)->configId_ == id) {
|
||||
if (env != (*iter)->env_) {
|
||||
HILOG_WARN("Not same env");
|
||||
iter++;
|
||||
continue;
|
||||
}
|
||||
HILOG_DEBUG("Same env, begin check observer equal");
|
||||
napi_value item = nullptr;
|
||||
bool equalFlag = false;
|
||||
napi_get_reference_value((*iter)->env_, (*iter)->handlerRef_, &item);
|
||||
|
@ -903,10 +903,10 @@ void StateListenerImpl::UnsubscribeObserver(napi_env env, napi_value observer)
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
for (auto iter = observers_.begin(); iter != observers_.end();) {
|
||||
if (env != (*iter)->env_) {
|
||||
HILOG_WARN("Not same env");
|
||||
iter++;
|
||||
continue;
|
||||
}
|
||||
HILOG_DEBUG("Same env, begin check observer equal");
|
||||
napi_value item = nullptr;
|
||||
bool equalFlag = false;
|
||||
napi_get_reference_value((*iter)->env_, (*iter)->handlerRef_, &item);
|
||||
|
Loading…
Reference in New Issue
Block a user