You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have a usecase similar to codepen.io where people can write their own javascript and it will execute for others on page. Security considerations are handled the same way but unfortunately I can't reliably handle the case where somebody writes while(true) and crashes the browser of anyone that navigates to the page. In fact this piece of code makes my PC (Windows 11) almost entirely unresponsive altogether.
Idea 1: Shouldn't the compute pressure API be able to react to pressure no matter how high it is and let me e.g reload the page consistently or interrupt the page entirely somehow? Because even if I somehow get a window.location.href = "/" off while this while(true) loop is running, it will not manage to reload the page because the pressure is just too high.
Idea 2: Or is another idea perhaps that the compute pressure API should let me put a maximum pressure value on the e.g mainthread or even on other webworkers? I think we just need some way to not let the browser go into total crash mode just because one script has decided to take every single nanosecond of available CPU power.
The text was updated successfully, but these errors were encountered:
Meai
changed the title
Usecase: 100% pressure, main thread blocked entirely. Please let me react?
Usecase: 100% pressure, main thread blocked entirely. PressureObserver never fires an event
Jul 21, 2024
Hi,
I have a usecase similar to codepen.io where people can write their own javascript and it will execute for others on page. Security considerations are handled the same way but unfortunately I can't reliably handle the case where somebody writes while(true) and crashes the browser of anyone that navigates to the page. In fact this piece of code makes my PC (Windows 11) almost entirely unresponsive altogether.
Idea 1: Shouldn't the compute pressure API be able to react to pressure no matter how high it is and let me e.g reload the page consistently or interrupt the page entirely somehow? Because even if I somehow get a window.location.href = "/" off while this while(true) loop is running, it will not manage to reload the page because the pressure is just too high.
Idea 2: Or is another idea perhaps that the compute pressure API should let me put a maximum pressure value on the e.g mainthread or even on other webworkers? I think we just need some way to not let the browser go into total crash mode just because one script has decided to take every single nanosecond of available CPU power.
The text was updated successfully, but these errors were encountered: