Home
last modified time | relevance | path

Searched refs:jsRuntime_ (Results 1 - 25 of 47) sorted by relevance

12

/foundation/ability/ability_runtime/frameworks/native/ability/native/child_process_manager/
H A Djs_child_process.cpp31 JsChildProcess::JsChildProcess(JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) {} in JsChildProcess()
35 jsRuntime_.FreeNativeReference(std::move(jsChildProcessObj_)); in ~JsChildProcess()
62 HandleScope handleScope(jsRuntime_); in Init()
63 jsChildProcessObj_ = jsRuntime_.LoadModule(moduleName, srcPath, info->hapPath, info->isEsModule); in Init()
87 HandleScope handleScope(jsRuntime_); in OnStart()
88 auto env = jsRuntime_.GetNapiEnv(); in OnStart()
103 HandleScope handleScope(jsRuntime_); in CallObjectMethod()
104 auto env = jsRuntime_.GetNapiEnv(); in CallObjectMethod()
/foundation/ability/ability_runtime/frameworks/native/ability/native/
H A Djs_extension_common.cpp43 : jsRuntime_(jsRuntime), jsObj_(jsObj), shellContextRef_(shellContextRef) {} in JsExtensionCommon()
47 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsExtensionCommon()
58 HandleScope handleScope(jsRuntime_); in OnConfigurationUpdated()
59 auto env = jsRuntime_.GetNapiEnv(); in OnConfigurationUpdated()
70 HandleScope handleScope(jsRuntime_); in OnMemoryLevel()
71 auto env = jsRuntime_.GetNapiEnv(); in OnMemoryLevel()
90 HandleScope handleScope(jsRuntime_); in CallObjectMethod()
91 auto env = jsRuntime_.GetNapiEnv(); in CallObjectMethod()
H A Djs_service_extension.cpp141 JsServiceExtension::JsServiceExtension(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsServiceExtension()
150 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsServiceExtension()
151 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsServiceExtension()
170 HandleScope handleScope(jsRuntime_); in Init()
171 auto env = jsRuntime_.GetNapiEnv(); in Init()
173 jsObj_ = jsRuntime_.LoadModule( in Init()
189 SetExtensionCommon(JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_)); in Init()
275 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
303 HandleScope handleScope(jsRuntime_); in OnStart()
304 napi_env env = jsRuntime_ in OnStart()
[all...]
/foundation/ability/ability_runtime/frameworks/native/ability/native/form_runtime/
H A Djs_form_extension.cpp79 JsFormExtension::JsFormExtension(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsFormExtension()
88 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsFormExtension()
89 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsFormExtension()
110 HandleScope handleScope(jsRuntime_); in Init()
111 auto env = jsRuntime_.GetNapiEnv(); in Init()
113 jsObj_ = jsRuntime_.LoadModule( in Init()
151 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
167 HandleScope handleScope(jsRuntime_); in OnCreate()
168 napi_env env = jsRuntime_.GetNapiEnv(); in OnCreate()
210 HandleScope handleScope(jsRuntime_); in OnDestroy()
[all...]
/foundation/communication/netmanager_ext/frameworks/native/vpnextension/src/
H A Djs_vpn_extension.cpp116 JsVpnExtension::JsVpnExtension(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsVpnExtension()
125 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsVpnExtension()
126 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsVpnExtension()
145 HandleScope handleScope(jsRuntime_); in Init()
146 auto env = jsRuntime_.GetNapiEnv(); in Init()
148 jsObj_ = jsRuntime_.LoadModule( in Init()
164 SetExtensionCommon(JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_)); in Init()
238 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
268 HandleScope handleScope(jsRuntime_); in OnStart()
269 napi_env env = jsRuntime_ in OnStart()
[all...]
/foundation/ability/ability_runtime/frameworks/native/ability/native/ability_runtime/
H A Djs_ability.cpp97 JsAbility::JsAbility(JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) in JsAbility()
107 jsRuntime_.FreeNativeReference(std::move(jsAbilityObj_)); in ~JsAbility()
108 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsAbility()
110 jsRuntime_.FreeNativeReference(std::move(jsWindowStageObj_)); in ~JsAbility()
133 HandleScope handleScope(jsRuntime_); in Init()
135 jsAbilityObj_ = jsRuntime_.LoadModule( in Init()
176 auto env = jsRuntime_.GetNapiEnv(); in BindContext()
199 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
222 HandleScope handleScope(jsRuntime_); in OnStart()
223 auto env = jsRuntime_ in OnStart()
[all...]
H A Djs_ui_ability.cpp148 JsUIAbility::JsUIAbility(JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) in JsUIAbility()
161 jsRuntime_.FreeNativeReference(std::move(jsAbilityObj_)); in ~JsUIAbility()
162 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsUIAbility()
164 jsRuntime_.FreeNativeReference(std::move(jsWindowStageObj_)); in ~JsUIAbility()
219 HandleScope handleScope(jsRuntime_); in SetAbilityContext()
220 auto env = jsRuntime_.GetNapiEnv(); in SetAbilityContext()
221 jsAbilityObj_ = jsRuntime_.LoadModule( in SetAbilityContext()
253 abilityContext_->Bind(jsRuntime_, shellContextRef_.get()); in SetAbilityContext()
294 HandleScope handleScope(jsRuntime_); in OnStart()
295 auto env = jsRuntime_ in OnStart()
[all...]
/foundation/ability/ability_runtime/frameworks/native/ability/native/auto_fill_extension_ability/
H A Djs_auto_fill_extension.cpp102 JsAutoFillExtension::JsAutoFillExtension(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) in JsAutoFillExtension()
114 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsAutoFillExtension()
115 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsAutoFillExtension()
117 jsRuntime_.FreeNativeReference(std::move(item.second)); in ~JsAutoFillExtension()
122 jsRuntime_.FreeNativeReference(std::move(callback.second)); in ~JsAutoFillExtension()
144 HandleScope handleScope(jsRuntime_); in Init()
145 auto env = jsRuntime_.GetNapiEnv(); in Init()
147 jsObj_ = jsRuntime_.LoadModule( in Init()
165 JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_)); in Init()
202 context->Bind(jsRuntime_, shellContextRef in BindContext()
[all...]
/foundation/ability/ability_runtime/frameworks/native/appkit/ability_delegator/runner_runtime/
H A Djs_test_runner.cpp56 : jsRuntime_(jsRuntime), isFaJsModel_(isFaJsModel) in JsTestRunner()
96 jsTestRunnerObj_ = jsRuntime_.LoadModule(moduleName, srcPath_, hapPath_, in JsTestRunner()
103 jsTestRunnerObj_ = jsRuntime_.LoadModule(moduleName, srcPath_, hapPath_, in JsTestRunner()
113 if (!jsRuntime_.RunScript("/system/etc/strip.native.min.abc", "")) { in Initialize()
118 if (!jsRuntime_.RunScript("/system/etc/abc/ability/delegator_mgmt.abc", "")) { in Initialize()
123 if (!jsRuntime_.RunSandboxScript(srcPath_, hapPath_)) { in Initialize()
128 napi_env env = jsRuntime_.GetNapiEnv(); in Initialize()
169 auto env = jsRuntime_.GetNapiEnv(); in CallObjectMethod()
203 HandleScope handleScope(jsRuntime_); in CallObjectMethod()
/foundation/ability/ability_runtime/frameworks/native/ability/native/ui_extension_ability/
H A Djs_ui_extension.cpp98 JsUIExtension::JsUIExtension(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) in JsUIExtension()
111 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsUIExtension()
112 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsUIExtension()
114 jsRuntime_.FreeNativeReference(std::move(item.second)); in ~JsUIExtension()
142 HandleScope handleScope(jsRuntime_); in Init()
143 auto env = jsRuntime_.GetNapiEnv(); in Init()
145 jsObj_ = jsRuntime_.LoadModule( in Init()
161 JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_)); in Init()
214 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
239 HandleScope handleScope(jsRuntime_); in OnStart()
[all...]
H A Djs_ui_extension_base.cpp104 : jsRuntime_(static_cast<JsRuntime&>(*runtime)) in JsUIExtensionBase()
112 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsUIExtensionBase()
113 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsUIExtensionBase()
115 jsRuntime_.FreeNativeReference(std::move(item.second)); in ~JsUIExtensionBase()
145 HandleScope handleScope(jsRuntime_); in Init()
147 jsObj_ = jsRuntime_.LoadModule( in Init()
157 return JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_); in Init()
162 HandleScope handleScope(jsRuntime_); in BindContext()
167 napi_env env = jsRuntime_.GetNapiEnv(); in BindContext()
197 context_->Bind(jsRuntime_, shellContextRef in BindContext()
[all...]
/foundation/ability/ability_runtime/frameworks/native/ability/native/ui_service_extension_ability/
H A Djs_ui_service_extension.cpp119 JsUIServiceExtension::JsUIServiceExtension(AbilityRuntime::JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsUIServiceExtension()
128 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsUIServiceExtension()
129 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsUIServiceExtension()
134 jsRuntime_.FreeNativeReference(std::move(jsProxyObject)); in ~JsUIServiceExtension()
155 HandleScope handleScope(jsRuntime_); in Init()
156 auto env = jsRuntime_.GetNapiEnv(); in Init()
158 jsObj_ = jsRuntime_.LoadModule( in Init()
174 SetExtensionCommon(JsExtensionCommon::Create(jsRuntime_, static_cast<NativeReference&>(*jsObj_), shellContextRef_)); in Init()
222 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
248 HandleScope handleScope(jsRuntime_); in OnStart()
[all...]
/foundation/distributeddatamgr/data_share/frameworks/native/provider/src/
H A Djs_datashare_ext_ability.cpp59 JsDataShareExtAbility::JsDataShareExtAbility(JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsDataShareExtAbility()
64 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsDataShareExtAbility()
82 HandleScope handleScope(jsRuntime_); in Init()
83 napi_env env = jsRuntime_.GetNapiEnv(); in Init()
85 jsObj_ = jsRuntime_.LoadModule( in Init()
103 auto contextRef = jsRuntime_.LoadSystemModule("application.DataShareExtensionAbilityContext", &contextObj, 1); in Init()
109 context->Bind(jsRuntime_, contextRef.release()); in Init()
121 HandleScope handleScope(jsRuntime_); in OnStart()
122 napi_env env = jsRuntime_.GetNapiEnv(); in OnStart()
141 jsRuntime_ in OnConnect()
[all...]
/foundation/ability/ability_runtime/frameworks/native/appkit/ability_runtime/app/
H A Djs_ability_stage.cpp108 : jsRuntime_(jsRuntime), jsAbilityStageObj_(std::move(jsAbilityStageObj)) in JsAbilityStage()
118 jsRuntime_.FreeNativeReference(std::move(jsAbilityStageObj_)); in ~JsAbilityStage()
119 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsAbilityStage()
149 HandleScope handleScope(jsRuntime_); in OnCreate()
150 auto env = jsRuntime_.GetNapiEnv(); in OnCreate()
183 HandleScope handleScope(jsRuntime_); in OnDestroy()
184 auto env = jsRuntime_.GetNapiEnv(); in OnDestroy()
211 HandleScope handleScope(jsRuntime_); in OnAcceptWant()
212 auto env = jsRuntime_.GetNapiEnv(); in OnAcceptWant()
245 HandleScope handleScope(jsRuntime_); in OnNewProcessRequest()
[all...]
/foundation/window/window_manager/extension/window_extension/src/
H A Djs_window_extension.cpp98 JsWindowExtension::JsWindowExtension(AbilityRuntime::JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsWindowExtension()
106 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsWindowExtension()
126 AbilityRuntime::HandleScope handleScope(jsRuntime_); in Init()
128 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init()
135 napi_env env = jsRuntime_.GetNapiEnv(); in Init()
153 napi_value contextObj = CreateJsWindowExtensionContext(jsRuntime_.GetNapiEnv(), context); in BindContext()
158 auto shellContextRef = jsRuntime_.LoadSystemModule("application.WindowExtensionContext", &contextObj, 1); in BindContext()
172 context->Bind(jsRuntime_, shellContextRef.release()); in BindContext()
215 napi_env env = jsRuntime_.GetNapiEnv(); in OnConnect()
219 napi_env napiEnv = jsRuntime_ in OnConnect()
[all...]
/foundation/ability/ability_runtime/frameworks/native/appkit/app_startup/
H A Djs_startup_task.cpp31 : StartupTask(name), jsRuntime_(jsRuntime), startupJsRef_(std::move(startupJsRef)), contextJsRef_(contextJsRef) {} in JsStartupTask()
61 return JsStartupTaskExecutor::RunOnMainThread(jsRuntime_, startupJsRef_, contextJsRef_, std::move(callback)); in RunTaskInit()
74 jsRuntime_, startupJsRef_, contextJsRef_, AsyncTaskExcutorJsRef_, AsyncTaskExcutorCallbackJsRef_, startupName); in RunTaskInit()
84 HandleScope handleScope(jsRuntime_); in LoadJsAsyncTaskExcutor()
85 auto env = jsRuntime_.GetNapiEnv(); in LoadJsAsyncTaskExcutor()
102 HandleScope handleScope(jsRuntime_); in LoadJsAsyncTaskCallback()
103 auto env = jsRuntime_.GetNapiEnv(); in LoadJsAsyncTaskCallback()
134 HandleScope handleScope(jsRuntime_); in RunTaskOnDependencyCompleted()
135 auto env = jsRuntime_.GetNapiEnv(); in RunTaskOnDependencyCompleted()
/foundation/ability/ability_runtime/frameworks/native/ability/native/photo_editor_extension_ability/
H A Djs_photo_editor_extension_impl.cpp79 HandleScope handleScope(jsRuntime_); in BindContext()
85 napi_env env = jsRuntime_.GetNapiEnv(); in BindContext()
117 context_->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
160 HandleScope handleScope(jsRuntime_); in OnStartContentEditing()
161 napi_env env = jsRuntime_.GetNapiEnv(); in OnStartContentEditing()
/foundation/ability/ability_runtime/test/sample/demo_ui_extension/native/demo_ui_extension_ability/src/
H A Djs_demo_ui_extension.cpp48 HandleScope handleScope(jsRuntime_); in OnForeground()
104 HandleScope handleScope(jsRuntime_); in BindContext()
110 napi_env env = jsRuntime_.GetNapiEnv(); in BindContext()
140 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
/foundation/resourceschedule/work_scheduler/frameworks/extension/src/
H A Djs_work_scheduler_extension.cpp36 JsWorkSchedulerExtension::JsWorkSchedulerExtension(AbilityRuntime::JsRuntime& jsRuntime) : jsRuntime_(jsRuntime) {} in JsWorkSchedulerExtension()
45 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsWorkSchedulerExtension()
46 jsRuntime_.FreeNativeReference(std::move(shellContextRef_)); in ~JsWorkSchedulerExtension()
106 AbilityRuntime::HandleScope handleScope(jsRuntime_); in Init()
107 napi_env env = jsRuntime_.GetNapiEnv(); in Init()
109 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init()
133 shellContextRef_ = jsRuntime_.LoadSystemModule("application.WorkSchedulerExtensionContext", in BindContext()
149 context->Bind(jsRuntime_, shellContextRef_.get()); in BindContext()
366 AbilityRuntime::HandleScope handleScope(jsRuntime_); in OnWorkStart()
367 napi_env env = jsRuntime_ in OnWorkStart()
[all...]
/foundation/filemanagement/app_file_service/frameworks/native/backup_ext/src/
H A Dext_backup_js.cpp392 AbilityRuntime::HandleScope handleScope(jsRuntime_); in Init()
393 jsObj_ = jsRuntime_.LoadModule(moduleName, modulePath, info.hapPath, in Init()
450 ExtBackupJs::ExtBackupJs(AbilityRuntime::JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) in ExtBackupJs()
458 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~ExtBackupJs()
466 auto env = jsRuntime_.GetNapiEnv(); in ExportJsContext()
485 auto contextRef = jsRuntime_.LoadSystemModule("application.BackupExtensionContext", &contextObj, ARGC_ONE); in ExportJsContext()
492 context->Bind(jsRuntime_, contextRef.release()); in ExportJsContext()
543 auto retParser = [jsRuntime{ &jsRuntime_ }, callbackInfoEx { callbackInfoEx_ }](napi_env envir, in CallJsOnBackupEx()
564 auto errCode = CallJsMethod("onBackupEx", jsRuntime_, jsObj_.get(), ParseBackupExInfo(), retParser); in CallJsOnBackupEx()
583 auto retParser = [jsRuntime {&jsRuntime_}, callbackInf in CallJsOnBackup()
[all...]
/foundation/filemanagement/user_file_service/interfaces/inner_api/file_access/src/
H A Djs_file_access_ext_ability.cpp67 JsFileAccessExtAbility::JsFileAccessExtAbility(JsRuntime &jsRuntime) : jsRuntime_(jsRuntime) {} in JsFileAccessExtAbility()
71 jsRuntime_.FreeNativeReference(std::move(jsObj_)); in ~JsFileAccessExtAbility()
90 HandleScope handleScope(jsRuntime_); in Init()
92 jsObj_ = jsRuntime_.LoadModule(moduleName, srcPath, abilityInfo_->hapPath, in Init()
110 HandleScope handleScope(jsRuntime_); in OnStart()
111 napi_env env = reinterpret_cast<napi_env>(&jsRuntime_.GetNativeEngine()); in OnStart()
124 reinterpret_cast<napi_env>(&jsRuntime_.GetNativeEngine()))); in OnConnect()
142 HandleEscape handleEscape(jsRuntime_); in CallObjectMethod()
143 auto &nativeEngine = jsRuntime_.GetNativeEngine(); in CallObjectMethod()
327 auto errCode = CallJsMethod("openFile", jsRuntime_, jsObj in OpenFile()
[all...]
/foundation/ability/ability_runtime/test/unittest/js_auto_fill_extension_test/
H A Djs_auto_fill_extension_test.cpp68 std::unique_ptr<Runtime> jsRuntime_ = nullptr; member in OHOS::AbilityRuntime::JsAutoFillExtensionTest
129 jsRuntime_ = JsRuntime::Create(options); in CreateJsAutoFillExtension()
130 ASSERT_NE(jsRuntime_, nullptr); in CreateJsAutoFillExtension()
132 JsAutoFillExtension *extension = JsAutoFillExtension::Create(jsRuntime_); in CreateJsAutoFillExtension()
/foundation/arkui/ace_engine/adapter/ohos/entrance/pa_engine/engine/common/
H A Djs_backend_timer_module.cpp66 : jsRuntime_(jsRuntime), jsFunction_(jsFunction), name_(name), interval_(interval), isInterval_(isInterval) in JsTimer()
74 jsRuntime_.PostTask(*this, name_, interval_); in operator ()()
80 AbilityRuntime::HandleScope handleScope(jsRuntime_); in operator ()()
91 NativeEngine* engine = jsRuntime_.GetNativeEnginePointer(); in operator ()()
109 AbilityRuntime::JsRuntime& jsRuntime_; member in OHOS::Ace::__anon1565::final
/foundation/ability/ability_runtime/interfaces/inner_api/child_process_manager/include/
H A Djs_child_process.h39 JsRuntime &jsRuntime_; member in OHOS::AbilityRuntime::JsChildProcess
/foundation/ability/ability_runtime/interfaces/kits/native/ability/native/
H A Djs_extension_common.h67 JsRuntime& jsRuntime_; member in OHOS::AbilityRuntime::JsExtensionCommon

Completed in 18 milliseconds

12