Skip to content

Commit da78201

Browse files
committed
Check for V8_CACHE_COMPILED_CODE value.
1 parent 29b5446 commit da78201

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/jni/Require.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#include "ExceptionUtil.h"
1313
#include "JniLocalRef.h"
1414
#include "ArgConverter.h"
15+
#include "Constants.h"
1516

1617
#include <sstream>
1718

@@ -222,6 +223,11 @@ namespace tns
222223

223224
ScriptCompiler::CachedData* Require::TryLoadScriptCache(const std::string& path)
224225
{
226+
if(!Constants::V8_CACHE_COMPILED_CODE)
227+
{
228+
return nullptr;
229+
}
230+
225231
auto cachePath = path + ".cache";
226232
if(!File::Exists(cachePath))
227233
{

0 commit comments

Comments
 (0)