| Summary: | [MSE] Bring back some useful SourceBuffer logs | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Enrique Ocaña <eocanha> |
| Component: | Media | Assignee: | Enrique Ocaña <eocanha> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Enrique Ocaña
2022-10-27 05:47:46 PDT
Pull request: https://github.com/WebKit/WebKit/pull/5854 Committed 256224@main (e5e73c6cc13d): <https://commits.webkit.org/256224@main> Reviewed commits have been landed. Closing PR #5854 and removing active labels. Jer Noble gave the following feedback in Slack:
This logging change looks pretty bad; there’s no need to use printf(); DEBUG_LOG() works with StringConcatenation. There’s no need to include the method name, because that’s included with LOGIDENTIFIER. And *this shouldn’t be needed here as that’s also included in LOGIDENTIFIER*.
Can you please undo these changes you made? They can be replaced with something more like this:
DEBUG_LOG(LOGIDENTIFIER, "size = ", size, ", buffered = ", m_private->buffered()->ranges());
If you get an error concatenating a PlatformTimeRanges, the right way to deal with that is to add a macro to PlatformTimeRanges.h like the one from MediaTime.h:
template<typename> struct LogArgument;
template<> struct LogArgument<MediaTime> {
static String toString(const MediaTime& time) { return time.toJSONString(); }
};
template<> struct LogArgument<MediaTimeRange> {
static String toString(const MediaTimeRange& range) { return range.toJSONString(); }
};
Pull request: https://github.com/WebKit/WebKit/pull/6044 Committed 256317@main (445669890d9b): <https://commits.webkit.org/256317@main> Reviewed commits have been landed. Closing PR #6044 and removing active labels. |