Hi,
I have posted this question before to the node.js mailing list, but
nobody replied so far. I suspect this problem to be node.js related
rather than V8, but maybe someone here can give me a hint.
Consider the following snippet:
const Script = process.binding("evals").Script
function ok() {
Script.runInNewContext("while (true) {}", {}, "test")
}
function err() {
const s = new Script("while (true) {}", "test")
s.runInNewContext({})
}
err()
When I start this with a debugger:
$ node --debug test1.js
and use d8 for debugging:
$ d8 --remote-debugger
dbg> Type: connect
V8-Version: 2.2.21
Protocol-Version: 1
Embedding-Host: node v0.1.100-3-g3d948d8
and then issue a debug command to show me the backtrace:
{"seq":1,"type":"request","command":"backtrace"}
I get back:
Internal error: TypeError: Object [object Script] has no method
'nameOrSourceURL'
OTOH d8 correctly reports the backtrace if I substitute err() with
ok() in the snippet above. I think err() and ok() should behave the
same w.r.t. debugging. The question is why it doesn't?
Thanks for your help!
Cheers,
Levi
--
v8-users mailing list
[email protected]
http://groups.google.com/group/v8-users