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 {
563563 ConformanceLookupResult result)
564564 : Type(key.Type), Witness(result.witnessTable)
565565 {
566- if (result.globalActorIsolationType ) {
567- ProtoOrStorage = new ExtendedStorage{
568- key.Proto , result.globalActorIsolationType ,
569- result.globalActorIsolationWitnessTable
570- };
571- } else {
566+ if (!result.globalActorIsolationType ) {
572567 ProtoOrStorage = key.Proto ;
568+ return ;
573569 }
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;
574579 }
575580
576581 bool matchesKey (const ConformanceCacheKey &key) const {
You can’t perform that action at this time.
0 commit comments