bootstrap - log an error when window config cannot be loaded in 10s (#127421)

This commit is contained in:
Benjamin Pasero 2021-06-29 19:41:19 +02:00
parent 090d8bc3b9
commit 158b9b3c36
No known key found for this signature in database
GPG key ID: E6380CC4C8219E65

View file

@ -52,10 +52,12 @@
});
// Await window configuration from preload
const timeout = setTimeout(() => { console.error(`[resolve window config] Could not resolve window configuration within 10 seconds, but will continue to wait...`); }, 10000);
performance.mark('code/willWaitForWindowConfig');
/** @type {ISandboxConfiguration} */
const configuration = await preloadGlobals.context.resolveConfiguration();
performance.mark('code/didWaitForWindowConfig');
clearTimeout(timeout);
// Signal DOM modifications are now OK
if (typeof options?.canModifyDOM === 'function') {