Bug 221539 - Add ConsoleMessage::toString()
Summary: Add ConsoleMessage::toString()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alicia Boya García
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-08 02:06 PST by Alicia Boya García
Modified: 2021-02-10 14:34 PST (History)
12 users (show)

See Also:


Attachments
Patch (7.41 KB, patch)
2021-02-08 02:58 PST, Alicia Boya García
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>