Web Worker: Workers loaded from using window.URLCreateObjectURL importScripts hang
Issue #4754087 • Assigned to Steve B.
Steps to reproduce
URL:
Repro Steps:
Execute the Following script (also located in the attachment) in IE and view the console output.
See that the last logged line is "calling importScipts(‘Fake_Url_XYZ.js’)", and the worker blocks at the
importScripts(‘Fake_Url_XYZ.js’);
statement and never continues\throws the expected exception
var scriptContent =
"console.log('Worker loaded');\r\n" +
"\r\n" +
"try {\r\n" +
" console.log(\"calling importScipts('Fake_Url_XYZ.js')\");\r\n" +
" // This line hangs in I.E. It should throw an exception\r\n" +
" importScripts('Fake_Url_XYZ.js');\r\n" + // This line hangs in I.E. It should throw an exception
" console.log(\"successfully imported 'Fake_Url_XYZ.js'. THIS SHOIULD NEVER HAPPEN\");\r\n" +
"} catch (e) {\r\n" +
" console.log(\"error in importScipts('Fake_Url_XYZ.js'). THIS IS EXPECTED\");\r\n" +
"}\r\n" +
"\r\n" +
"console.log(\"Finished loading worker\");\r\n";
var blob = new Blob([scriptContent], { type: 'text/javascript' });
var url = window.URL.createObjectURL(blob);
var worker = new Worker(url);
Expected Results:
The browser should throw an exception.
Actual Results:
Dev Channel specific:
No
You need to sign in to your Microsoft account to add a comment.
Sign in