This change fixes a race condition on reveald3 whereas sometimes multiple iframes can get created.
Because the check for the presence of previous iframes was previously done before an await statement, two calls to initialize can happen concurrently, both of them get an empty list, both of them asynchronously await, and both of them create the new iframe. By checking for the presence of the iframe and creating an iframe inside the same synchronous block, we guarantee no race conditions.
This change fixes a race condition on reveald3 whereas sometimes multiple iframes can get created.
Because the check for the presence of previous iframes was previously done before an
await
statement, two calls toinitialize
can happen concurrently, both of them get an empty list, both of them asynchronouslyawait
, and both of them create the newiframe
. By checking for the presence of the iframe and creating an iframe inside the same synchronous block, we guarantee no race conditions.