Skip to content

Commit

Permalink
fix(v8): v8 code cache file broken protect
Browse files Browse the repository at this point in the history
  • Loading branch information
etkmao authored and zealotchen0 committed Oct 27, 2023
1 parent bf266b9 commit f9b468e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions android/sdk/src/main/jni/src/bridge/entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -351,8 +351,10 @@ bool RunScriptInternal(const std::shared_ptr<Runtime>& runtime,
if (!read_script_flag || StringViewUtils::IsEmpty(script_content)) {
TDF_BASE_LOG(WARNING) << "read_script_flag = " << read_script_flag
<< ", script content empty, uri = " << uri;
std::lock_guard<std::mutex> lock(code_cache_file_mutex);
CheckUseCodeCacheAfterRunScript(code_cache_path);
if (is_use_code_cache) {
std::lock_guard<std::mutex> lock(code_cache_file_mutex);
CheckUseCodeCacheAfterRunScript(code_cache_path);
}
return false;
}

Expand Down

0 comments on commit f9b468e

Please sign in to comment.