enjalot / enjalot/blockbuilder

Writing loops can crash the browser/tab

Open
#92 7 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
332
Forks
59
PR merge metrics
No merged PRs in 30d

Description

I don't have a clear repro for this (and am afraid to try!) but: I was writing a `for` loop and the tab became unresponsive (Chrome). I think I probably piled up a bunch of script refresh requests (or maybe just one is all it took?) that had infinite loops in them, something like the unfinished:

`for (var i=0; i<10; i) {}`

(The braces are autocompleted in the editor, which makes it possible for the above incomplete construction to get compiled.)

Without having looking into Block Builder's source, I'm not sure how you might detect and kill this kind of process, but you might put a timeout on each script rebuild and somehow `break` out of the build if it takes too long...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.