New issue
Advanced search Search tips

Issue 661329 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug



Sign in to add a comment

Invalid cast from RenderWidgetHostViewGuest to RWHVMac.

Project Member Reported by ekaramad@chromium.org, Nov 1 2016

Issue description

Version: 56.0.2906.0 (Official Build) canary (64-bit)
OS: Mac OSX

Currently, there is an invalid cast from RenderWidgetHostViewGuest to RenderWidgetHostViewMac in the method
GetRenderWidgetHostViewToUse() inside "render_widget_host_view_mac.mm". Both methods override SpeakSelection()  from RenderWidgetHostView and this codepath is triggered through a call to startSpeaking/stopSpeaking in RenderWidgetHostViewCocoa.
 
Status: Assigned (was: Untriaged)
Cc: a...@chromium.org
Avi, does this need a security label/component?

Comment 3 by a...@chromium.org, Nov 2 2016

I don't think so. The call is common so the correct result comes out and it's isolated.
Project Member

Comment 4 by bugdroid1@chromium.org, Nov 2 2016

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

commit b5802c0cf50d70bc72ebc5fae7356af8aa64f98e
Author: ekaramad <ekaramad@chromium.org>
Date: Wed Nov 02 19:42:44 2016

Fix an invalid cast from RenderWidgetHostViewGuest to RenderWidgetHostViewMac

The method GetRenderWidgetHostViewToUse() picks the guest WebContents for the
fullscreen page to be used for start/stopSpeaking commands in Mac. The guest
WebContents's RenderWidgetHostView is however is incorrectly assumed to be
RenderWidgetHostViewMac. It is actually a RenderWidgetHostViewGuest.

Moreover, since the method SpeakSelection() is implemented for
RenderWidgetHostView there is indeed no need to further cast the view to
RenderWidgetHostViewMac/Guest at all.

BUG= 661329 

Review-Url: https://codereview.chromium.org/2473443003
Cr-Commit-Position: refs/heads/master@{#429368}

[modify] https://crrev.com/b5802c0cf50d70bc72ebc5fae7356af8aa64f98e/content/browser/renderer_host/render_widget_host_view_mac.mm

Status: Fixed (was: Assigned)
Marking bug as fixed since the cast was removed altogether.

Sign in to add a comment