修改LoadSystemModuleByEngine中的模块名。

Signed-off-by: Hollokin <taoyuxin2@huawei.com>
This commit is contained in:
Hollokin 2023-02-01 14:36:36 +08:00
parent 4f49a58fc2
commit 591ce1cd48

View File

@ -51,7 +51,7 @@ NativeValue *AttachInputMethodExtensionContext(NativeEngine *engine, void *value
return nullptr;
}
NativeValue *object = CreateJsInputMethodExtensionContext(*engine, ptr);
auto contextObj = JsRuntime::LoadSystemModuleByEngine(engine, "inputmethodextensioncontext", &object, 1)->Get();
auto contextObj = JsRuntime::LoadSystemModuleByEngine(engine, "InputMethodExtensionContext", &object, 1)->Get();
NativeObject *nObject = ConvertNativeValueTo<NativeObject>(contextObj);
nObject->ConvertToNativeBindingObject(
engine, DetachCallbackFunc, AttachInputMethodExtensionContext, value, nullptr);
@ -125,7 +125,7 @@ void JsInputMethodExtension::BindContext(NativeEngine &engine, NativeObject *obj
}
IMSA_HILOGI("JsInputMethodExtension::Init CreateJsInputMethodExtensionContext.");
NativeValue *contextObj = CreateJsInputMethodExtensionContext(engine, context);
auto shellContextRef = jsRuntime_.LoadSystemModule("inputmethodextensioncontext", &contextObj, ARGC_ONE);
auto shellContextRef = jsRuntime_.LoadSystemModule("InputMethodExtensionContext", &contextObj, ARGC_ONE);
contextObj = shellContextRef->Get();
auto nativeObj = ConvertNativeValueTo<NativeObject>(contextObj);
if (nativeObj == nullptr) {