From 4e663b29598388f0959a4fddb1948139196e9736 Mon Sep 17 00:00:00 2001 From: chen Date: Fri, 12 Jul 2024 14:50:29 +0800 Subject: [PATCH] =?UTF-8?q?JSVM=E6=96=B0=E5=A2=9E=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chen Change-Id: I35f307310271974a16d7927611b6eb4ed2099b69 --- ark_runtime/jsvm/jsvm.h | 16 ++++++++++++++++ ark_runtime/jsvm/libjsvm.ndk.json | 4 ++++ 2 files changed, 20 insertions(+) diff --git a/ark_runtime/jsvm/jsvm.h b/ark_runtime/jsvm/jsvm.h index a7530de2a..c5cf07f51 100644 --- a/ark_runtime/jsvm/jsvm.h +++ b/ark_runtime/jsvm/jsvm.h @@ -2852,6 +2852,22 @@ JSVM_EXTERN JSVM_Status OH_JSVM_CreateFunctionWithScript(JSVM_Env env, JSVM_Value script, JSVM_Value* result); +/** + * @brief This function activates insepctor with pid and alias it. + * + * @param env: The environment that the API is invoked under. + * @param pid: A process id to identify the inspector connection. + * @param name: An alias for the inspector that under a specific pid. + * default name is jsvm if a nullptr is passed in. + * @return Returns JSVM funtions result code. + * Returns {@link JSVM_OK } if the function executed successfully.\n + * Returns {@link JSVM_PENDING_EXCEPTION } if an exception occurs.\n + * @since 12 + */ +JSVM_EXTERN JSVM_Status OH_JSVM_OpenInspectorWithName(JSVM_Env env, + int pid, + const char* name); + EXTERN_C_END /** @} */ diff --git a/ark_runtime/jsvm/libjsvm.ndk.json b/ark_runtime/jsvm/libjsvm.ndk.json index 37f66255e..63bddfc3c 100644 --- a/ark_runtime/jsvm/libjsvm.ndk.json +++ b/ark_runtime/jsvm/libjsvm.ndk.json @@ -690,5 +690,9 @@ { "first_introduced": "12", "name": "OH_JSVM_CreateFunctionWithScript" + }, + { + "first_introduced": "12", + "name": "OH_JSVM_OpenInspectorWithName" } ] -- Gitee