Chrome 68 introduced eager evalution (https://developers.google.com/web/updates/2018/05/devtools#eagerevaluation), which evaluates any expression (as you type) so long as no side effects are incurred. It also does not get locked up if your expression is actually evaluating to some expensive computation/infinite loop.

How does this work? Both the side-effect detection and the cap on CPU time. I would guess that it needs V8 to support some sort of write barriers just for this use case. And somehow it can (safely) terminate a Javascript tick of execution.

0 Answers