chore(vscode): update to 1.55.2

This commit is contained in:
Akash Satheesan
2021-04-09 11:32:27 +05:30
1102 changed files with 39988 additions and 23544 deletions

View File

@@ -686,10 +686,29 @@ var AMDLoader;
}
WorkerScriptLoader.prototype.load = function (moduleManager, scriptSrc, callback, errorback) {
var trustedTypesPolicy = moduleManager.getConfig().getOptionsLiteral().trustedTypesPolicy;
if (trustedTypesPolicy) {
scriptSrc = trustedTypesPolicy.createScriptURL(scriptSrc);
var isCrossOrigin = (/^((http:)|(https:)|(file:))/.test(scriptSrc) && scriptSrc.substring(0, self.origin.length) !== self.origin);
if (!isCrossOrigin) {
// use `fetch` if possible because `importScripts`
// is synchronous and can lead to deadlocks on Safari
fetch(scriptSrc).then(function (response) {
if (response.status !== 200) {
throw new Error(response.statusText);
}
return response.text();
}).then(function (text) {
text = text + "\n//# sourceURL=" + scriptSrc;
var func = (trustedTypesPolicy
? self.eval(trustedTypesPolicy.createScript('', text))
: new Function(text));
func.call(self);
callback();
}).then(undefined, errorback);
return;
}
try {
if (trustedTypesPolicy) {
scriptSrc = trustedTypesPolicy.createScriptURL(scriptSrc);
}
importScripts(scriptSrc);
callback();
}