Skip to content

Commit 8f61aab

Browse files
author
Mihail Slavchev
committed
fix caching for required JSON files
1 parent 113f130 commit 8f61aab

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

runtime/src/main/jni/Module.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,10 @@ Local<Object> Module::LoadData(Isolate *isolate, const string& path)
462462

463463
json = value.As<Object>();
464464

465+
auto poObj = new Persistent<Object>(isolate, json);
466+
467+
m_loadedModules.insert(make_pair(path, ModuleCacheEntry(poObj, true /* isData */)));
468+
465469
return json;
466470
}
467471

0 commit comments

Comments
 (0)