Skip to content

Commit c05fd6f

Browse files
committed
Produce code cache only if needed.
1 parent 83c43b2 commit c05fd6f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/jni/Require.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,10 @@ namespace tns
150150
}
151151
else
152152
{
153-
option = ScriptCompiler::kProduceCodeCache;
153+
if(Constants::V8_CACHE_COMPILED_CODE)
154+
{
155+
option = ScriptCompiler::kProduceCodeCache;
156+
}
154157
script = ScriptCompiler::Compile(isolate->GetCurrentContext(), &source, option).ToLocalChecked();
155158
SaveScriptCache(source, path);
156159
}

0 commit comments

Comments
 (0)