diff --git a/runtime/ecma_compiler.cpp b/runtime/ecma_compiler.cpp index 16dbb03a65196a6f753504ee12c4ff09e3959a54..69d8dc9be619443e6b26191df81ac0021a03d6de 100644 --- a/runtime/ecma_compiler.cpp +++ b/runtime/ecma_compiler.cpp @@ -47,7 +47,7 @@ void EcmaCompiler::AddTask(CompilerTask &&task, TaggedValue func) auto func_ref = gos->Add(func.GetHeapObject(), panda::mem::Reference::ObjectType::GLOBAL); static_cast(GetRuntimeInterface())->AddFunctionInMap(task.GetMethod(), func_ref); } - GetThreadPool()->PutTask(std::move(task)); + Compiler::AddTask(std::move(task), func); } } // namespace panda::ecmascript