Skip to content

Commit

Permalink
[unreal]上个改法用到的v8接口在quickjs backend没有模拟,改为另外一种方式
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Feb 7, 2025
1 parent 6fe69f7 commit 467e3a0
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions unreal/Puerts/Source/JsEnv/Public/JsObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ struct FJsObject
#ifdef THREAD_SAFE
v8::Locker Locker(Isolate);
#endif
GContext.Reset(Isolate, InOther.GContext);
GObject.Reset(Isolate, InOther.GObject);
v8::Isolate::Scope IsolateScope(Isolate);
v8::HandleScope HandleScope(Isolate);
GContext.Reset(Isolate, InOther.GContext.Get(Isolate));
GObject.Reset(Isolate, InOther.GObject.Get(Isolate));
JsEnvLifeCycleTracker = PUERTS_NAMESPACE::DataTransfer::GetJsEnvLifeCycleTracker(Isolate);
}

Expand Down Expand Up @@ -96,8 +98,10 @@ struct FJsObject
return *this;
}
Isolate = InOther.Isolate;
GContext.Reset(Isolate, InOther.GContext);
GObject.Reset(Isolate, InOther.GObject);
v8::Isolate::Scope IsolateScope(Isolate);
v8::HandleScope HandleScope(Isolate);
GContext.Reset(Isolate, InOther.GContext.Get(Isolate));
GObject.Reset(Isolate, InOther.GObject.Get(Isolate));
JsEnvLifeCycleTracker = PUERTS_NAMESPACE::DataTransfer::GetJsEnvLifeCycleTracker(Isolate);
return *this;
}
Expand Down

0 comments on commit 467e3a0

Please sign in to comment.