fix review problem

Signed-off-by: Mupceet <laiguizhong@huawei.com>
This commit is contained in:
Mupceet 2022-10-17 16:49:08 +08:00
parent 2b231e1609
commit 190e405550
3 changed files with 3 additions and 3 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);