mirror of
https://gitee.com/openharmony/inputmethod_imf
synced 2024-11-27 08:51:48 +00:00
modify for build error
Signed-off-by: zhaolinglan <zhaolinglan@huawei.com>
This commit is contained in:
parent
2c1a5e9f77
commit
e2d6bc6602
@ -34,13 +34,11 @@ namespace MiscServices {
|
||||
void JsInputMethodEngineListener::AddCallback(std::string type, NativeValue* jsListenerObject)
|
||||
{
|
||||
IMSA_HILOGI("JsInputMethodEngineListener::AddCallback is called : %{public}s", type.c_str());
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::shared_ptr<NativeReference> callbackRef(engine_->CreateReference(jsListenerObject, 1));
|
||||
if (callbackRef == nullptr) {
|
||||
IMSA_HILOGI("JsInputMethodEngineListener::AddCallback fail, callbackRef is nullptr.");
|
||||
return;
|
||||
}
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
std::shared_ptr<NativeReference> callbackRef(engine_->CreateReference(jsListenerObject, 1));
|
||||
if (callbackRef == nullptr) {
|
||||
IMSA_HILOGI("JsInputMethodEngineListener::AddCallback fail, callbackRef is nullptr.");
|
||||
return;
|
||||
}
|
||||
std::lock_guard<std::recursive_mutex> lk(mapMutex);
|
||||
jsCbMap_[type].push_back(callbackRef);
|
||||
|
Loading…
Reference in New Issue
Block a user