Possible bug in Debug::NotifyMessageHandler?

24 views
Skip to first unread message

Mihail Slavchev

unread,
Apr 15, 2015, 11:12:12 AM4/15/15
to v8-u...@googlegroups.com
Hi,

I was investigating an issue with the V8 debugger when I stumbled on an unexpected program flow in Debug::NotifyMessageHandler method. More precisely, the current method implementation contains the following switch statement.


  switch (event) {
   
case v8::Break:
   
case v8::BreakForCommand:
      sendEventMessage
= !auto_continue;
     
break;
   
case v8::Exception:
      sendEventMessage
= true;
     
break;
   
case v8::BeforeCompile:
     
break;
   
case v8::AfterCompile:
      sendEventMessage
= true;
     
break;
   
case v8::NewFunction:
     
break;
   
default:
      UNREACHABLE
();
 
}

Because my JavaScript code uses promises Debug::NotifyMessageHandler method is called with PromiseEvent and AsyncTaskEvent arguments which are not handled with the above mentioned switch statement. Hence, the program flow goes through the default clause and UNREACHABLE() method is called.

Is this the expected program flow?

TIA,
Mihail



Ben Noordhuis

unread,
Apr 15, 2015, 1:23:01 PM4/15/15
to v8-u...@googlegroups.com
It looks like an oversight to me. I would file a bug at
https://code.google.com/p/v8/issues.

Yang Guo

unread,
Apr 16, 2015, 9:26:48 AM4/16/15
to v8-u...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages