diff --git a/frameworks/native/ability/native/extension_config_mgr.cpp b/frameworks/native/ability/native/extension_config_mgr.cpp index ce9ebf8f7b..469cdcc65a 100644 --- a/frameworks/native/ability/native/extension_config_mgr.cpp +++ b/frameworks/native/ability/native/extension_config_mgr.cpp @@ -68,16 +68,18 @@ void ExtensionConfigMgr::LoadExtensionBlockList(const std::string &extensionName if (item.key() != extensionName) { continue; } - if (!blackList[item.key()].is_array()) { + if (!blocklist[item.key()].is_array()) { continue; } - for (const auto& value : blackList[item.key()]) { + for (const auto& value : blocklist[item.key()]) { if (value.is_string()) { currentBlockList.emplace(value.get()); } } + std::lock_guard lock(extensionBlockListMutex_); extensionBlocklist_.emplace(type, std::move(currentBlockList)); currentBlockList.clear(); + break; } inFile.close(); }