mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 01:59:58 +00:00
修复抖音aot后cppcrash问题
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IB2KCZ Signed-off-by: zhao1d <zhaolidong4@huawei.com> Change-Id: I4e3587e2ba0275a7c736f4293cddf52f34746da7
This commit is contained in:
parent
a61788fcd3
commit
420a6fd1ed
@ -1942,6 +1942,12 @@ JSHandle<JSHClass> ObjectFactory::CreateDefaultClassConstructorHClass(JSHClass *
|
||||
return defaultHclass;
|
||||
}
|
||||
|
||||
void ObjectFactory::SetCodeEntryToFunctionFromMethod(const JSHandle<JSFunction> &func, const JSHandle<Method> &mothed)
|
||||
{
|
||||
uintptr_t entry = mothed->GetCodeEntryOrLiteral();
|
||||
func->SetCodeEntry(entry);
|
||||
}
|
||||
|
||||
JSHandle<JSFunction> ObjectFactory::NewJSFunctionByHClass(const JSHandle<Method> &method,
|
||||
const JSHandle<JSHClass> &clazz,
|
||||
MemSpaceType type)
|
||||
@ -1969,6 +1975,8 @@ JSHandle<JSFunction> ObjectFactory::NewJSFunctionByHClass(const JSHandle<Method>
|
||||
if (method->IsAotWithCallField()) {
|
||||
thread_->GetEcmaVM()->GetAOTFileManager()->
|
||||
SetAOTFuncEntry(method->GetJSPandaFile(), *function, *method);
|
||||
} else {
|
||||
SetCodeEntryToFunctionFromMethod(function, method);
|
||||
}
|
||||
return function;
|
||||
}
|
||||
|
@ -892,6 +892,8 @@ public:
|
||||
JSHandle<SendableEnv> NewSendableEnv(int numSlots);
|
||||
JSHandle<JSFunction> NewJSSendableFunction(const JSHandle<Method> &methodHandle);
|
||||
|
||||
void SetCodeEntryToFunctionFromMethod(const JSHandle<JSFunction> &func, const JSHandle<Method> &mothed);
|
||||
|
||||
private:
|
||||
friend class GlobalEnv;
|
||||
friend class GlobalEnvConstants;
|
||||
|
@ -245,6 +245,8 @@ JSHandle<JSFunction> ObjectFactory::NewSFunctionByHClass(const JSHandle<Method>
|
||||
if (method->IsAotWithCallField()) {
|
||||
thread_->GetEcmaVM()->GetAOTFileManager()->
|
||||
SetAOTFuncEntry(method->GetJSPandaFile(), *function, *method);
|
||||
} else {
|
||||
SetCodeEntryToFunctionFromMethod(function, method);
|
||||
}
|
||||
return function;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user