File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -563,14 +563,19 @@ namespace {
563
563
ConformanceLookupResult result)
564
564
: Type(key.Type), Witness(result.witnessTable)
565
565
{
566
- if (result.globalActorIsolationType ) {
567
- ProtoOrStorage = new ExtendedStorage{
568
- key.Proto , result.globalActorIsolationType ,
569
- result.globalActorIsolationWitnessTable
570
- };
571
- } else {
566
+ if (!result.globalActorIsolationType ) {
572
567
ProtoOrStorage = key.Proto ;
568
+ return ;
573
569
}
570
+
571
+ // Allocate extended storage.
572
+ void *memory = malloc (sizeof (ExtendedStorage));
573
+ auto storage = new (memory) ExtendedStorage{
574
+ key.Proto , result.globalActorIsolationType ,
575
+ result.globalActorIsolationWitnessTable
576
+ };
577
+
578
+ ProtoOrStorage = storage;
574
579
}
575
580
576
581
bool matchesKey (const ConformanceCacheKey &key) const {
You can’t perform that action at this time.
0 commit comments