Bug 221539

Summary: Add ConsoleMessage::toString()
Product: WebKit Reporter: Alicia Boya García <aboya>
Component: JavaScriptCoreAssignee: Alicia Boya García <aboya>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, eric.carlson, ews-watchlist, hi, joepeck, keith_miller, mark.lam, mkwst, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=221421
Attachments:
Description Flags
Patch none

Description Alicia Boya García 2021-02-08 02:06:13 PST
Currently ConsoleMessage doesn't have a publicly API to retrieve the
stored JSON values into a string for printing.

The closest equivalent is message(), but it doesn't return any JSON
objects attached. This makes it an ill fit when printing
ConsoleMessage's to the system terminal, since these JSON values often
contain information that is important for debugging, e.g.:

SourceBufferPrivateGStreamer::removeCodedFrames(126493C320000001) removing sample (notice: no sample)
SourceBufferPrivateGStreamer::removeCodedFrames(126493C320000001) the range in removeCodedFrames() includes already enqueued samples, reenqueueing from (notice: no time)

This patch adds a new ConsoleMessage::toString() method that
constructs a String containing these JSON values, and makes use of it
when printing messages to the system terminal, giving more useful
output.
Comment 1 Alicia Boya García 2021-02-08 02:58:34 PST
Created attachment 419571 [details]
Patch
Comment 2 EWS 2021-02-08 10:11:36 PST
Committed r272499: <https://commits.webkit.org/r272499>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 419571 [details].
Comment 3 Radar WebKit Bug Importer 2021-02-10 14:34:44 PST
<rdar://problem/74206695>