remove-NotifyError-calls-and-just-send-a-normal-message.patch 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. From 3bfec15358b788a2b7e1beefaa177ba84a6da328 Mon Sep 17 00:00:00 2001
  2. From: Ted Meyer <tmathmeyer@chromium.org>
  3. Date: Mon, 1 Jun 2020 19:31:18 +0000
  4. Subject: [PATCH] Remove NotifyError calls and just send a normal message
  5. instead
  6. rewrote the TODO as well.
  7. Bug: 1088055
  8. Change-Id: If83ceeb3a786a1813e41bd3ac6c7309791e92400
  9. Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2223010
  10. Auto-Submit: Ted Meyer <tmathmeyer@chromium.org>
  11. Commit-Queue: Dale Curtis <dalecurtis@chromium.org>
  12. Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
  13. Cr-Commit-Position: refs/heads/master@{#773776}
  14. ---
  15. media/filters/decoder_selector.cc | 12 +++++-------
  16. 1 file changed, 5 insertions(+), 7 deletions(-)
  17. diff --git a/media/filters/decoder_selector.cc b/media/filters/decoder_selector.cc
  18. index bb06378b92d..9f510bb578c 100644
  19. --- a/media/filters/decoder_selector.cc
  20. +++ b/media/filters/decoder_selector.cc
  21. @@ -165,13 +165,11 @@ void DecoderSelector<StreamType>::OnDecoderInitializeDone(Status status) {
  22. DCHECK(task_runner_->BelongsToCurrentThread());
  23. if (!status.is_ok()) {
  24. - // TODO(tmathmeyer) this might be noisy in media log. Consider batching
  25. - // all failures as causes to a single Status object and only surfacing it if
  26. - // decoder selection fails entirely.
  27. - media_log_->NotifyError(
  28. - Status(StatusCode::kDecoderFailedInitialization)
  29. - .WithData("Decoder name", decoder_->GetDisplayName())
  30. - .AddCause(std::move(status)));
  31. + // TODO(tmathmeyer) this was too noisy in media log. Batch all the logs
  32. + // together and then send them as an informational notice instead of
  33. + // using NotifyError.
  34. + MEDIA_LOG(INFO, media_log_)
  35. + << "Failed to initialize " << decoder_->GetDisplayName();
  36. // Try the next decoder on the list.
  37. decoder_.reset();