New issue
Advanced search Search tips

Issue 806010 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

V8 messages go into a black hole in unit tests

Project Member Reported by jbroman@chromium.org, Jan 25 2018

Issue description

It would probably be convenient if Blink unit test targets (e.g. webkit_unit_tests) had a message listener registered on the main thread isolate, at least, that went to the console.

We just had a bug when writing a unit test which was easy to debug once we noticed the exception message. It should be fairly simple to send these messages to LOG(WARNING) or similar, at least.

v8::Isolate::AddMessageListener with a simple four-line-ish implementation ought to suffice. Is there a reason not to (e.g. maybe this is too noisy)?
 
Owner: adithyas@chromium.org
Status: Assigned (was: Untriaged)
There are basically three places this could be hooked in:
- directly on the isolate (only captures V8 messages, but not other console messages)
- at ChromeClient (AddMessageToConsole)
- at WebFrameClient (similar)

The latter two will capture all console messages (including V8 ones, which are forwarded there by a message listener registered in V8Initializer), but are frame-specific, which means that each unit test would need to separately hook up to it. (There are some common utilities, but this is still non-trivial.)

Sign in to add a comment