Skip to content

Commit

Permalink
[unity]尝试修复v2的ut测试
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Apr 8, 2024
1 parent fd48993 commit dfc703d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions unity/native_src_il2cpp/Src/Puerts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,6 @@ static v8::Value* GetModuleExecutor(v8::Context* env)
auto ret = pesapi_eval((pesapi_env) env, (const uint8_t*) ExecuteModuleJSCode, strlen(ExecuteModuleJSCode), "__puer_execute__.mjs");

auto Isolate = Context->GetIsolate();
v8::HandleScope HandleScope(Isolate);
v8::Context::Scope ContextScope(Context);
v8::Local<v8::Object> Global = Context->Global();
auto Ret = Global->Get(Context, v8::String::NewFromUtf8(Isolate, EXECUTEMODULEGLOBANAME).ToLocalChecked());
v8::Local<v8::Value> Func;
if (Ret.ToLocal(&Func) && Func->IsFunction())
{
return *Func;
}

return *v8::FunctionTemplate::New(Isolate, puerts::esmodule::ExecuteModule)->GetFunction(Context).ToLocalChecked();;
}
Expand Down

0 comments on commit dfc703d

Please sign in to comment.