Fix #3519; restricting importScripts has always been buggy and we probably don't need it

This commit is contained in:
Nick Winter 2016-04-17 17:32:37 -07:00
parent 15d762e93e
commit d739fbef9b

View file

@ -84,12 +84,6 @@ var ensureLanguagesImportedFromUserCodeMap = function (userCodeMap) {
var restricted = ["XMLHttpRequest", "Worker"];
if (!self.navigator || !(self.navigator.userAgent.indexOf('MSIE') > 0) &&
!self.navigator.userAgent.match(/Trident.*rv\:11\./) &&
!self.navigator.userAgent.match(/Edge/)) {
// Can't restrict 'importScripts' in IE11, skip for all IE versions
restricted.push("importScripts");
}
for(var i = 0; i < restricted.length; ++i) {
// We could do way more from this: http://stackoverflow.com/questions/10653809/making-webworkers-a-safe-environment
Object.defineProperty(self, restricted[i], {