/foundation/arkui/ace_engine_lite/frameworks/native_engine/jsi/test/unittest/common/ |
H A D | jsi_interface_tdd_test.cpp | 51 return JSI::CreateUndefined(); in Function() 58 double newValue = JSI::ValueToNumber(args[0]); in Setter() 62 return JSI::CreateUndefined(); in Setter() 72 return JSI::CreateNumber(g_descValue); in Getter() 89 * @tc.steps: step1. call JSI CreateObject in JSIInterfaceTest001() 91 JSIValue object = JSI::CreateObject(); in JSIInterfaceTest001() 95 bool res = JSI::ValueIsObject(object); in JSIInterfaceTest001() 102 JSI::ReleaseValue(object); in JSIInterfaceTest001() 110 * @tc.steps: step1. call JSI GetGlobalObject in JSIInterfaceTest002() 112 JSIValue global = JSI in JSIInterfaceTest002() [all...] |
/foundation/communication/netstack/frameworks/js/builtin/fetch/src/ |
H A D | http_async_callback.cpp | 52 JSI::ReleaseValue(asyncCallback->responseCallback[CB_SUCCESS]); in AsyncCallbackDeleter() 55 JSI::ReleaseValue(asyncCallback->responseCallback[CB_FAIL]); in AsyncCallbackDeleter() 58 JSI::ReleaseValue(asyncCallback->responseCallback[CB_COMPLETE]); in AsyncCallbackDeleter() 65 JSIValue object = JSI::CreateObject(); in ResponseDataToJsValue() 70 JSI::SetNumberProperty(object, HttpConstant::KEY_HTTP_RESPONSE_CODE, responseData.GetCode()); in ResponseDataToJsValue() 77 std::unique_ptr<JSIVal, decltype(&JSI::ReleaseValue)> jsonObj(JSI::JsonParse(responseData.GetData().c_str()), in ResponseDataToJsValue() 78 JSI::ReleaseValue); in ResponseDataToJsValue() 79 if (jsonObj != nullptr && !JSI::ValueIsUndefined(jsonObj.get()) && JSI in ResponseDataToJsValue() [all...] |
H A D | fetch_module.cpp | 31 JSI::SetModuleAPI(exports, FetchModule::HTTP_API_KEY_FETCH, FetchModule::Fetch); in InitFetchModule() 36 JSI::ReleaseString(s); in FreeString() 45 return JSI::CreateUndefined(); in Fetch() 50 asyncCallback->responseCallback[CB_SUCCESS] = JSI::GetNamedProperty(args[0], CB_SUCCESS); in Fetch() 51 asyncCallback->responseCallback[CB_FAIL] = JSI::GetNamedProperty(args[0], CB_FAIL); in Fetch() 52 asyncCallback->responseCallback[CB_COMPLETE] = JSI::GetNamedProperty(args[0], CB_COMPLETE); in Fetch() 56 return JSI::CreateUndefined(); in Fetch() 62 return JSI::CreateUndefined(); in Fetch() 67 if (options == nullptr || JSI::ValueIsUndefined(options) || !JSI in JsObjectToRequestData() [all...] |
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/ |
H A D | sample_module.cpp | 27 return JSI::CreateUndefined(); in TestCallFunc() 32 JSIValue undefValue = JSI::CreateUndefined(); in TestCallback() 33 if ((args == nullptr) || (argsNum == 0) || JSI::ValueIsUndefined(args[0])) { in TestCallback() 37 JSIValue callback = JSI::GetNamedProperty(args[0], CB_CALLBACK); in TestCallback() 38 JSIValue result = JSI::CreateObject(); in TestCallback() 40 JSI::SetNumberProperty(result, "x", defaultVal); in TestCallback() 42 JSI::CallFunction(callback, thisVal, argv, ARGC_ONE); in TestCallback() 43 JSI::ReleaseValueList(callback, result); in TestCallback() 49 JSIValue undefValue = JSI::CreateUndefined(); in TestStandardCallback() 50 if ((args == nullptr) || (argsNum == 0) || JSI in TestStandardCallback() [all...] |
H A D | dfx_module.cpp | 53 return JSI::ValueToString(args[0]); in GetDomViewId() 86 JSIValue retVal = JSI::CreateBoolean(true); in Screenshot() 89 JSI::ReleaseValue(retVal); in Screenshot() 90 retVal = JSI::CreateBoolean(false); in Screenshot() 94 JSIValue retVal = JSI::CreateBoolean(true); in Screenshot() 107 JSI::ReleaseValue(retVal); in Screenshot() 108 retVal = JSI::CreateBoolean(false); in Screenshot() 120 JSIValue retVal = JSI::CreateBoolean(false); in DumpDomTree() 140 JSI::ReleaseValue(retVal); in DumpDomTree() 141 retVal = JSI in DumpDomTree() [all...] |
H A D | app_module.cpp | 50 JSIValue result = JSI::CreateUndefined(); in GetInfo() 62 result = JSI::CreateObject(); in GetInfo() 64 JSI::SetStringProperty(result, KEY_APP_NAME, appName->valuestring); in GetInfo() 67 JSI::SetStringProperty(result, KEY_VERSION_NAME, versionName->valuestring); in GetInfo() 70 JSI::SetNumberProperty(result, KEY_VERSION_CODE, versionCode->valuedouble); in GetInfo() 128 return JSI::CreateUndefined(); in Terminate() 134 JSIValue undefValue = JSI::CreateUndefined(); in ScreenOnVisible() 135 if ((args == nullptr) || (argsNum == 0) || (JSI::ValueIsUndefined(args[0]))) { in ScreenOnVisible() 140 JSIValue visibleInput = JSI::GetNamedProperty(args[0], SCREEN_ON_VISIBLE_KEY); in ScreenOnVisible() 142 if (!JSI in ScreenOnVisible() [all...] |
H A D | dialog_module.cpp | 56 char *dialogTitle = JSI::GetStringProperty(args[0], TITLE_KEY);
in ShowDialog() 61 char *message = JSI::GetStringProperty(args[0], MSG_KEY);
in ShowDialog() 66 JSIValue buttons = JSI::GetNamedProperty(args[0], BUTTON_KEY);
in ShowDialog() 69 JSIValue successFunc = JSI::GetNamedProperty(args[0], SUCCESS_FUNC_KEY);
in ShowDialog() 70 JSIValue cancelFunc = JSI::GetNamedProperty(args[0], CANCEL_FUNC_KEY);
in ShowDialog() 71 JSIValue completeFunc = JSI::GetNamedProperty(args[0], COMPLETE_FUNC_KEY);
in ShowDialog() 79 JSI::ReleaseValueList(buttons, successFunc, cancelFunc, completeFunc);
in ShowDialog()
|
H A D | sample_module.h | 48 JSI::SetModuleAPI(exports, "testCallFunc", SampleModule::TestCallFunc); in InitSampleModule() 49 JSI::SetModuleAPI(exports, "testCallback", SampleModule::TestCallback); in InitSampleModule() 50 JSI::SetModuleAPI(exports, "testStandardCallback", SampleModule::TestStandardCallback); in InitSampleModule() 51 JSI::SetModuleAPI(exports, "testCallbackWithArgs", SampleModule::TestCallbackWithArgs); in InitSampleModule() 52 JSI::SetModuleAPI(exports, "testStandardCallbackWithArgs", SampleModule::TestStandardCallbackWithArgs); in InitSampleModule() 53 JSI::SetModuleAPI(exports, "testGeneralFunc", SampleModule::TestGeneralFunc); in InitSampleModule() 54 JSI::SetOnDestroy(exports, SampleModule::OnDestroy); in InitSampleModule() 55 JSI::SetOnTerminate(exports, SampleModule::OnTerminate); in InitSampleModule()
|
H A D | dfx_module.h | 53 JSI::SetModuleAPI(exports, "screenshotToFile", DfxModule::Screenshot); in InitDfxModule() 55 JSI::SetModuleAPI(exports, "injectEvent", DfxModule::InjectEvent); in InitDfxModule() 56 JSI::SetModuleAPI(exports, "dumpDomNode", DfxModule::DumpDomNode); in InitDfxModule() 57 JSI::SetModuleAPI(exports, "dumpDomTree", DfxModule::DumpDomTree); in InitDfxModule() 58 JSI::SetOnDestroy(exports, DfxModule::OnDestroy); in InitDfxModule()
|
H A D | router_module.cpp | 28 JSI::SetModuleAPI(exports, "replace", RouterModule::Replace); in InitRouterModule() 29 JSI::SetModuleAPI(exports, "replaceUrl", RouterModule::Replace); in InitRouterModule() 36 return JSI::CreateErrorWithCode(JSI_ERR_CODE_PARAM_CHECK_FAILED, "params should only be one object."); in Replace()
|
H A D | app_module.h | 62 JSI::SetModuleAPI(exports, "getInfo", AppModule::GetInfo); in InitAppModule() 63 JSI::SetModuleAPI(exports, "terminate", AppModule::Terminate); in InitAppModule() 65 JSI::SetModuleAPI(exports, "screenOnVisible", AppModule::ScreenOnVisible); in InitAppModule()
|
H A D | dialog_module.h | 51 JSI::SetModuleAPI(exports, "showDialog", DialogModule::ShowDialog);
in InitDialogModule()
|
/foundation/multimedia/media_lite/interfaces/kits/player_lite/js/builtin/src/ |
H A D | audio_module.cpp | 43 JSI::DefineNamedProperty(target, propName, descriptor); in DefineProperty() 48 return JSI::CreateBoolean(AudioPlayer::GetInstance()->Play()); in Play() 53 return JSI::CreateBoolean(AudioPlayer::GetInstance()->Pause()); in Pause() 58 return JSI::CreateBoolean(AudioPlayer::GetInstance()->Stop()); in Stop() 65 return JSI::CreateBoolean(false); in GetPlayState() 69 if (!JSI::ValueIsObject(options)) { in GetPlayState() 71 return JSI::CreateBoolean(false); in GetPlayState() 74 JSIValue successCallback = JSI::GetNamedProperty(options, PROP_SUCCESS); in GetPlayState() 75 if (!JSI::ValueIsUndefined(successCallback)) { in GetPlayState() 77 JSIValue data = JSI in GetPlayState() [all...] |
H A D | audio_player.cpp | 56 AudioEventListener::AudioEventListener(JSIValue callback) : callback_(JSI::AcquireValue(callback)) {} in AudioEventListener() 60 if (!JSI::ValueIsUndefined(callback_)) { in ~AudioEventListener() 61 JSI::ReleaseValue(callback_); in ~AudioEventListener() 72 if (JSI::ValueIsFunction(callback_)) { in OnTrigger() 73 JSI::CallFunction(callback_, JSI::CreateUndefined(), nullptr, 0); in OnTrigger()
|
/foundation/arkui/ace_engine_lite/frameworks/module_manager/test/unittest/common/ |
H A D | require_module_tdd_test.cpp | 50 EXPECT_FALSE(JSI::ValueIsUndefined(moduleRequired)); in RequireModuleTest001() 51 JSI::ReleaseValue(moduleRequired); in RequireModuleTest001() 66 EXPECT_TRUE(JSI::ValueIsUndefined(moduleRequired)); in RequireModuleTest002() 67 JSI::ReleaseValue(moduleRequired); in RequireModuleTest002() 82 EXPECT_TRUE(JSI::ValueIsUndefined(moduleRequired)); in RequireModuleTest003() 83 JSI::ReleaseValue(moduleRequired); in RequireModuleTest003() 98 EXPECT_TRUE(JSI::ValueIsUndefined(moduleRequired)); in RequireModuleTest004() 99 JSI::ReleaseValue(moduleRequired); in RequireModuleTest004() 114 EXPECT_FALSE(JSI::ValueIsUndefined(moduleRequired)); in RequireModuleTest005() 119 JSIValue jFunc = JSI in RequireModuleTest005() [all...] |
/foundation/arkui/ace_engine_lite/frameworks/src/core/dialog/ |
H A D | js_dialog.cpp | 118 uint32_t len = JSI::GetArrayLength(buttonArrayObject);
in ParseButton() 129 JSIValue buttonObject = JSI::GetPropertyByIndex(buttonArrayObject, index);
in ParseButton() 130 char *buttonText = JSI::GetStringProperty(buttonObject, buttonTextKey);
in ParseButton() 133 char *buttonColorText = JSI::GetStringProperty(buttonObject, buttonColorKey);
in ParseButton() 139 JSI::ReleaseString(buttonText);
in ParseButton() 140 JSI::ReleaseString(buttonColorText);
in ParseButton() 141 JSI::ReleaseValue(buttonObject);
in ParseButton() 145 // release button JSI value
in ParseButton() 146 JSI::ReleaseString(buttonText);
in ParseButton() 147 JSI in ParseButton() [all...] |
/foundation/arkui/ace_engine_lite/frameworks/native_engine/jsi/ |
H A D | jsi.cpp | 28 JSIValue JSI::GetGlobalObject() in GetGlobalObject() 33 HILOG_ERROR(HILOG_MODULE_ACE, "JSI:GetGlobalObject has not been implemented in this js engine!"); in GetGlobalObject() 38 JSIValue JSI::CreateObject() in CreateObject() 43 HILOG_ERROR(HILOG_MODULE_ACE, "JSI:CreateObject has not been implemented in this js engine!"); in CreateObject() 48 void JSI::SetProperty(JSIValue object, JSIValue key, JSIValue value) in SetProperty() 51 HILOG_ERROR(HILOG_MODULE_ACE, "JSI:SetProperty failed!"); in SetProperty() 61 HILOG_ERROR(HILOG_MODULE_ACE, "JSI:SetProperty has not been implemented in this js engine!"); in SetProperty() 65 void JSI::SetNamedProperty(JSIValue object, const char * const propName, JSIValue value) in SetNamedProperty() 68 HILOG_ERROR(HILOG_MODULE_ACE, "JSI:SetNamedProperty failed!"); in SetNamedProperty() 76 HILOG_ERROR(HILOG_MODULE_ACE, "JSI in SetNamedProperty() [all...] |
/foundation/bundlemanager/bundle_framework_lite/interfaces/kits/bundle_lite/js/builtin/src/ |
H A D | capability_module.cpp | 23 return JSI::CreateBoolean(false); in HasCapability() 25 char *str = JSI::ValueToString(args[0]); in HasCapability() 27 return JSI::CreateBoolean(false); in HasCapability() 31 return JSI::CreateBoolean(hasCap); in HasCapability() 36 JSI::SetModuleAPI(exports, "has", CapabilityModule::HasCapability); in InitCapabilityModule()
|
/foundation/arkui/ace_engine_lite/frameworks/module_manager/ |
H A D | module_manager.cpp | 36 return JSI::CreateUndefined(); in RequireModule() 44 if ((JSI::ValueIsUndefined(moduleObj)) && (productModulesGetter_ != nullptr)) { in RequireModule() 51 if ((JSI::ValueIsUndefined(moduleObj)) && (privateModulesGetter_ != nullptr)) { in RequireModule() 57 moduleObj = JSI::CreateUndefined(); in RequireModule() 71 JSI::ReleaseValue(requiredSystemModules); in CleanUpModule() 140 return JSI::CreateUndefined(); in GetModuleObject() 144 return JSI::CreateUndefined(); in GetModuleObject() 159 return JSI::CreateUndefined(); in GetModuleObject() 173 return JSI::CreateUndefined(); in GetModuleObject() 179 categoryObj = JSI in InitModuleObject() [all...] |
/foundation/arkui/ace_engine_lite/frameworks/src/core/router/test/unittest/common/ |
H A D | router_module_tdd_test.cpp | 407 JSIValue thisVal = JSI::CreateUndefined(); in HWTEST_F() 409 JSIValue args[argsNum] = {JSI::CreateUndefined(), JSI::CreateUndefined()}; in HWTEST_F() 417 EXPECT_TRUE(JSI::ValueIsError(callResult)); in HWTEST_F() 418 JSI::ReleaseValue(callResult); in HWTEST_F() 430 JSIValue context = JSI::CreateUndefined(); in HWTEST_F() 439 EXPECT_TRUE(JSI::ValueIsError(result)); in HWTEST_F() 440 JSI::ReleaseValue(result); in HWTEST_F() 452 JSIValue context = JSI::CreateObject(); in HWTEST_F() 454 JSIValue args[argsNumber] = {JSI in HWTEST_F() [all...] |
/foundation/arkui/ace_engine_lite/frameworks/src/core/modules/presets/test/unittest/common/ |
H A D | localization_module_tdd_test.cpp | 80 JSIValue undefined = JSI::CreateUndefined();
in HWTEST_F() 83 JSIValue array = JSI::CreateArray(1);
in HWTEST_F() 84 JSI::ReleaseValueList(array, undefined);
in HWTEST_F()
|
/foundation/arkui/ace_engine_lite/interfaces/inner_api/builtin/jsi/ |
H A D | jsi.h | 82 class JSI final : public MemoryHeap { 277 * @return JSI value created 346 * @param: value JSI value to release 355 * @param: JSI value list to release 565 * @brief Acquire the specified JSI value to create a reference 567 * @param [in] value: JSI value to acquire 775 JSI() {} in JSI() function in OHOS::ACELite::final 776 ~JSI() {} in ~JSI()
|
/foundation/arkui/ace_engine_lite/frameworks/tools/qt/simulator/jsfwk/targets/simulator/utils/ |
H A D | js_heap_stats_dumper.cpp | 36 if (!JSI::GetJSHeapStatus(stats)) {
in Dump()
|
/foundation/arkui/ace_engine_lite/frameworks/src/core/router/ |
H A D | js_page_state_machine.cpp | 189 jsRes = AS_JERRY_VALUE(JSI::CreateErrorWithCode(JSI_ERR_CODE_PARAM_CHECK_FAILED, in BindUri() 228 jsRes = AS_JERRY_VALUE(JSI::CreateErrorWithCode(ERR_CODE_URL_NOTEXIST, "route target doesn't existed.")); in BindUri() 337 if (JSI::GetJSHeapStatus(heapStatus)) { in ForceGC()
|