Commit 00d00be9 authored by Jose Dapena Paz's avatar Jose Dapena Paz Committed by Commit Bot

libstdc++: do not pass a unique_ptr directly to stream insertion operator in...

libstdc++: do not pass a unique_ptr directly to stream insertion operator in CrossThreadMediaSourceAttachment.

Fix build error using libstdc++:
../../third_party/blink/renderer/modules/mediasource/cross_thread_media_source_attachment.cc:578:37: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘std::unique_ptr<blink::WebMediaSource>’)
  578 |            << ", web_media_source=" << web_media_source;
      |                                     ^~ ~~~~~~~~~~~~~~~~
      |                                        |
      |                                        std::unique_ptr<blink::WebMediaSource>

This is because libstdc++ does not provide an operator<< implementation for std::unique_ptr
(but libc++ does provide it).

Bug: 957519
Change-Id: I344b0f289d625b036e6bd4cafac1000cff6f23ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2486260Reviewed-by: default avatarMatthew Wolenetz <wolenetz@chromium.org>
Commit-Queue: José Dapena Paz <jdapena@igalia.com>
Cr-Commit-Position: refs/heads/master@{#819267}
parent f8d3a0b3
......@@ -575,7 +575,7 @@ void CrossThreadMediaSourceAttachment::CompleteAttachingToMediaElement(
MediaSourceTracer* /* tracer */,
std::unique_ptr<WebMediaSource> web_media_source) {
DVLOG(1) << __func__ << " this=" << this
<< ", web_media_source=" << web_media_source;
<< ", web_media_source=" << web_media_source.get();
DCHECK(web_media_source);
{
......@@ -618,7 +618,7 @@ void CrossThreadMediaSourceAttachment::
DCHECK(worker_runner_->BelongsToCurrentThread());
DVLOG(1) << __func__ << " this=" << this
<< ", web_media_source=" << web_media_source;
<< ", web_media_source=" << web_media_source.get();
// While awaiting task scheduling, the media element could have begun
// detachment or main context could have been destroyed. Return early in
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment