New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 795397 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 760320



Sign in to add a comment

Viz Content Unittests Crash in content::RenderWidgetHostImpl::SubmitCompositorFrame

Project Member Reported by jonr...@chromium.org, Dec 15 2017

Issue description

When running content_unittests with --enable viz we do not initialize viz related components.

When content::RenderWidgetHostImpl::SubmitCompositorFrame runs it calls renderer_compositor_frame_sink_->DidReceiveCompositorFrameAck(resources)

This crashes in mojo code as the |receiver_| is null.

Tests will need a mock viz::mojom::CompositorFrameSinkClientPtr to stub this out.

Failing tests:
  RenderWidgetHostTest.FrameToken_RendererCrash
  RenderWidgetHostTest.NewContentRenderingTimeout
  RenderWidgetHostTest.SwapCompositorFrameWithBadSourceId
 
Cc: jonr...@chromium.org sundarrajs@google.com
Status: Available (was: Untriaged)
Build target: content_unittests

Executing: ./out/Debug/content_unittests --gtest_filter=RenderWidgetHostTest.FrameToken_RendererCrash

Then change the filter for other tests which you wish to run.
Cc: yiyix@chromium.org
Also see: CompositorFrameSinkInterceptorForTesting as an autogenerated mock which may assist if a non-trivial mock is needed.

Comment 4 by samans@chromium.org, Jan 19 2018

I don't think we should worry about tests that call SubmitCompositorFrame. These tests should be removed or replaced with a viz-friendly version. The CL I'm working on right now basically disables RenderWidgetHostTest.NewContentRenderingTimeout and RenderWidgetHostTest.SwapCompositorFrameWithBadSourceId when surface sync is on.

Comment 5 by samans@chromium.org, Jan 19 2018

Cc: samans@chromium.org
Project Member

Comment 6 by bugdroid1@chromium.org, Jan 24 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2fb22bb2686842c314e06f3d0471bcc344a12cd3

commit 2fb22bb2686842c314e06f3d0471bcc344a12cd3
Author: Shridhar Sundarraj <sundarrajs@google.com>
Date: Wed Jan 24 20:40:40 2018

Content Unittest Crash Fix in RenderWidgetHostImpl::SubitCompositorFrame

Content unittests crash when they call
RenderWidgetHostImpl::SubmitCompositorFrame because it calls
renderer_compositor_frame_sink_->DidReceiveCompositorFrameAck(resources)
that tries to dereference a nullptr (|receiver_|).

In my change, I stub out |renderer_compositor_frame_sink_| with a mock
in each failing content unittest, by replacing
CompositorFrameSinkClientPtr (|renderer_compositor_frame_sink_|) with a
CompositorFrameSinkClientPtr bound to MockCompositorFrameSinkClient.

Bug:  795397 
Change-Id: Ibb820023332c7c6d2203b6e48549043ec0aa638f
Reviewed-on: https://chromium-review.googlesource.com/875013
Reviewed-by: Yi Xu <yiyix@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Fady Samuel <fsamuel@chromium.org>
Commit-Queue: Shridhar Sundarraj <sundarrajs@google.com>
Cr-Commit-Position: refs/heads/master@{#531671}
[modify] https://crrev.com/2fb22bb2686842c314e06f3d0471bcc344a12cd3/content/browser/renderer_host/render_widget_host_unittest.cc

Status: Fixed (was: Available)

Sign in to add a comment