Commit 3df2bcc2 authored by boliu's avatar boliu Committed by Commit bot

Fix media crash in layout test

Layout test do not use compositor thread, so WebMediaPlayerAndroid ends
up using a null message loop.

BUG=412578

Review URL: https://codereview.chromium.org/586493002

Cr-Commit-Position: refs/heads/master@{#295596}
parent e98bcec0
...@@ -137,8 +137,11 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid( ...@@ -137,8 +137,11 @@ WebMediaPlayerAndroid::WebMediaPlayerAndroid(
is_playing_(false), is_playing_(false),
needs_establish_peer_(true), needs_establish_peer_(true),
has_size_info_(false), has_size_info_(false),
// Compositor thread does not exist in layout tests.
compositor_loop_( compositor_loop_(
RenderThreadImpl::current()->compositor_message_loop_proxy()), RenderThreadImpl::current()->compositor_message_loop_proxy()
? RenderThreadImpl::current()->compositor_message_loop_proxy()
: base::MessageLoopProxy::current()),
stream_texture_factory_(factory), stream_texture_factory_(factory),
needs_external_surface_(false), needs_external_surface_(false),
video_frame_provider_client_(NULL), video_frame_provider_client_(NULL),
......
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