V8 messages go into a black hole in unit tests |
|
Issue descriptionIt 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)?
,
Jan 25 2018
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 |
|
Comment 1 by adithyas@chromium.org
, Jan 25 2018Status: Assigned (was: Untriaged)