diff --git a/src/vs/base/worker/workerMain.ts b/src/vs/base/worker/workerMain.ts index ec18c5ca0f4..35c685ff771 100644 --- a/src/vs/base/worker/workerMain.ts +++ b/src/vs/base/worker/workerMain.ts @@ -84,7 +84,7 @@ text = `${text}\n//# sourceURL=${loaderSrc}`; const func = ( trustedTypesPolicy - ? globalThis.eval(trustedTypesPolicy.createScript('', text) as unknown as string) + ? globalThis.eval(trustedTypesPolicy.createScript('', text) as unknown as string) // CodeQL [SM01632] fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari : new Function(text) // CodeQL [SM01632] fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari ); func.call(globalThis); diff --git a/src/vs/loader.js b/src/vs/loader.js index a618210a168..302fa3441d4 100644 --- a/src/vs/loader.js +++ b/src/vs/loader.js @@ -705,7 +705,7 @@ var AMDLoader; }).then((text) => { text = `${text}\n//# sourceURL=${scriptSrc}`; const func = (trustedTypesPolicy - ? self.eval(trustedTypesPolicy.createScript('', text)) + ? self.eval(trustedTypesPolicy.createScript('', text)) // CodeQL [SM01632] the loader is responsible with loading code, fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari : new Function(text) // CodeQL [SM01632] the loader is responsible with loading code, fetch + eval is used on the web worker instead of importScripts if possible because importScripts is synchronous and we observed deadlocks on Safari ); func.call(self);