Skip to content

Commit

Permalink
Merge pull request mozilla#52 from bytecodealliance/cfallin/fix-aot-ics
Browse files Browse the repository at this point in the history
Fix AOT ICs: eagerly ensure JitZone is created.
  • Loading branch information
cfallin authored Jul 26, 2024
2 parents 98caba9 + 93d2fb6 commit de2fc59
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions js/src/gc/GC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5013,6 +5013,16 @@ Realm* js::NewRealm(JSContext* cx, JSPrincipals* principals,
zone->compartments().infallibleAppend(compHolder.release());
}

#ifdef ENABLE_JS_AOT_ICS
if (zone) {
// This is where the AOT IC corpus is loaded. If we do not eagerly force
// this, it may not be created when initializing then snapshotting the
// engine, because its creation is only otherwise triggered lazily by
// execution.
zone->ensureJitZoneExists(cx);
}
#endif

if (zoneHolder) {
rt->gc.zones().infallibleAppend(zoneHolder.release());

Expand Down

0 comments on commit de2fc59

Please sign in to comment.