From e466651c806c6f1ac092534c70acf7ff09dc32ac Mon Sep 17 00:00:00 2001 From: Lostoner Date: Tue, 20 May 2025 17:24:50 +0800 Subject: [PATCH] fix the crash caused from the instanceId Signed-off-by: Lostoner --- native_engine/native_engine.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/native_engine/native_engine.h b/native_engine/native_engine.h index a3b1db469..512426d20 100644 --- a/native_engine/native_engine.h +++ b/native_engine/native_engine.h @@ -162,12 +162,6 @@ public: virtual void CancelCheckUVLoop(); #endif virtual void* GetJsEngine(); - virtual void SetInstanceId(int32_t id) { - instanceId_ = id; - }; - virtual int32_t GetInstanceId() { - return instanceId_; - }; virtual const EcmaVM* GetEcmaVm() const = 0; virtual bool NapiNewTypedArray(NativeTypedArrayType typedArrayType, @@ -577,6 +571,13 @@ public: virtual napi_status DestroyContext() = 0; + virtual void SetInstanceId(int32_t id) { + instanceId_ = id; + }; + virtual int32_t GetInstanceId() { + return instanceId_; + }; + private: void InitUvField(); -- Gitee