Peter Rybin
unread,Dec 18, 2009, 6:47:06 PM12/18/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Søren Gjesse, v8-...@googlegroups.com
Hi Soren
I am looking at Debug::SetMessageHandler2 function and I see some controversy about its status.
It uses HandleScope, that means it requires to be called from a regular V8 thread with locker. On the other hand DebuggerAgent::Run calls this function from its thread without acquiring any lockers. It starts to fail if you activate Lockers yourself, probably nobody has tried it yet.
I tried to remove HandleScope, thinking that this function should not touch any sensitive part of V8 at all and thus being available from any thread without lockers, but tests demonstrate the opposite:
11 Handle() /home/prybin/src-v8-3/src/handles-inl.h:42 0x080b5253
10 v8::internal::CodeStub::GetCode() /home/prybin/src-v8-3/src/code-stubs.cc:114 0x081141ba
9 BreakLocationIterator() /home/prybin/src-v8-3/src/debug.cc:76 0x08126ecf
8 v8::internal::Debug::ClearAllBreakPoints() /home/prybin/src-v8-3/src/debug.cc:983 0x08126ff7
7 v8::internal::Debugger::UnloadDebugger() /home/prybin/src-v8-3/src/debug.cc:1997 0x0812705b
6 v8::internal::Debugger::ListenersChanged() /home/prybin/src-v8-3/src/debug.cc:2221 0x081271d6
5 v8::internal::Debugger::SetMessageHandler() /home/prybin/src-v8-3/src/debug.cc:2198 0x081271ff
4 v8::Debug::SetMessageHandler2() /home/prybin/src-v8-3/src/api.cc:3675 0x080f0b87
3 TestDebuggerUnload() /home/prybin/src-v8-3/test/cctest/test-debug.cc:4528 0x080af892
My sample appication "lineprocessor" depends on this, so I guess we need some fixing here.
Peter