5 ms·
> As it stands right now a while(true) loop crashes the page > [...] I also desperately want to prevent crashing as a result of logic errors I could be wrong
by rewq4321 6y ago
> As it stands right now a while(true) loop crashes the page
> [...] I also desperately want to prevent crashing as a result of logic errors
I could be wrong here, but I think the new Site Isolation stuff in Chromium[0] may mean that you can sandbox an iframe to a different origin, so that the main threads of the top frame and the iframe aren't synced. So the iframe where the code is running would freeze, but the main frame would still be responsive. Again, I may have misinterpreted this because I only read about it in passing, and it was a while ago.
[0] https://www.chromium.org/Home/chromium-security/site-isolation https://www.chromium.org/Home/chromium-security/site-isolati...
- angleofrepose 6y agoA brief skim through that doc looks like it is about a kind of security that's not relevant to my project. I'm trying to protect the user from themselves while simultaneously giving the user full power over the document. Web workers are interesting and relevant to this use case, however the almost total isolation doesn't lend itself to manipulating the DOM without the user explicitly writing a custom API to interpret the worker's messages. So, back to the same problem. Thanks for the link. I'll do some digging into chrome's sandbox[1]: [1]: https://chromium.googlesource.com/chromium/src/+/master/docs/design/sandbox.md https://chromium.googlesource.com/chromium/src/+/master/docs...