mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 08:03:29 +00:00
Fix bug worker Fallback
issues:https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I60P7R?from=project-issue Signed-off-by: changjiaxing <changjiaxing2@huawei.com> Change-Id: I7f47bfc59894d43827437a8e401de001ca593797
This commit is contained in:
parent
092cebea91
commit
216811153c
@ -68,6 +68,9 @@ const JSPandaFile *JSPandaFileManager::LoadJSPandaFile(JSThread *thread, const C
|
||||
const JSPandaFile *JSPandaFileManager::LoadJSPandaFile(JSThread *thread, const CString &filename,
|
||||
std::string_view entryPoint, const void *buffer, size_t size)
|
||||
{
|
||||
if (buffer == nullptr || size == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
{
|
||||
os::memory::LockHolder lock(jsPandaFileLock_);
|
||||
const JSPandaFile *jsPandaFile = FindJSPandaFileUnlocked(filename);
|
||||
@ -77,10 +80,6 @@ const JSPandaFile *JSPandaFileManager::LoadJSPandaFile(JSThread *thread, const C
|
||||
}
|
||||
}
|
||||
|
||||
if (buffer == nullptr || size == 0) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto pf = panda_file::OpenPandaFileFromMemory(buffer, size);
|
||||
if (pf == nullptr) {
|
||||
LOG_ECMA(ERROR) << "open file " << filename << " error";
|
||||
|
Loading…
Reference in New Issue
Block a user