File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -5432,14 +5432,20 @@ ScriptContext::GetJitFuncRangeCache()
5432
5432
JITManager::HandleServerCallResult (hr, RemoteCallType::StateUpdate);
5433
5433
}
5434
5434
5435
- if (this ->GetLibrary ()->GetModuleRecordList ())
5436
- {
5437
- this ->GetLibrary ()->GetModuleRecordList ()->Map ([this ](int start, SourceTextModuleRecord* moduleRecord) {
5438
- HRESULT hr = JITManager::GetJITManager ()->AddModuleRecordInfo (
5439
- m_remoteScriptContextAddr,
5440
- moduleRecord->GetModuleId (),
5441
- (intptr_t )moduleRecord->GetLocalExportSlots ());
5442
- JITManager::HandleServerCallResult (hr, RemoteCallType::StateUpdate);
5435
+ ModuleRecordList* moduleRecordList = this ->GetLibrary ()->GetModuleRecordList ();
5436
+ if (moduleRecordList)
5437
+ {
5438
+ moduleRecordList->Map ([this ](int start, SourceTextModuleRecord* moduleRecord) {
5439
+ intptr_t exportSlotsAddr = (intptr_t )moduleRecord->GetLocalExportSlots ();
5440
+ // only add modules which have initialized localExportSlots
5441
+ if (exportSlotsAddr)
5442
+ {
5443
+ HRESULT hr = JITManager::GetJITManager ()->AddModuleRecordInfo (
5444
+ m_remoteScriptContextAddr,
5445
+ moduleRecord->GetModuleId (),
5446
+ exportSlotsAddr);
5447
+ JITManager::HandleServerCallResult (hr, RemoteCallType::StateUpdate);
5448
+ }
5443
5449
});
5444
5450
}
5445
5451
}
You can’t perform that action at this time.
0 commit comments