SharedWorker-replace-EventHandler.any.js (453B)
1 // META: global=sharedworker 2 // https://crbug.com/239669 3 const t = async_test("Tests that repeatedly setting 'onerror' within a shared worker doesnt crash."); 4 onconnect = t.step_func_done((event) => { 5 function update() { 6 onerror = undefined; 7 } 8 try { 9 for (var i = 0; i < 8; ++i) { 10 update(); 11 } 12 } catch (ex) { 13 assert_unreached("FAIL: unexpected exception (" + ex + ") received while updating onerror event handler."); 14 } 15 });