provegard / ncdbg

A debugger for Nashorn that uses Chrome DevTools as frontend
BSD 3-Clause "New" or "Revised" License
31 stars 5 forks source link

Implement Runtime.compileScript #84

Closed provegard closed 6 years ago

provegard commented 6 years ago

The method is not only used for snippets, but also for some console evaluation. Chrome falls back to evaluate, but it takes some time.

One problem is that we don't detect scripts until after the VM has resumed, but here we need to do it while it's paused.

provegard commented 6 years ago

When persist is false, the call is only used for syntax checking:

https://github.com/v8/v8/blob/0d2c85b70b44ffdfe3d66c947e754fe0a23de564/src/inspector/v8-runtime-agent-impl.cc#L461