Update bad cast in Profile::FromBrowserContext |
||
Issue descriptionAs we found in issue 721975, there's a bad cast in the code below, due to TestBrowserContext: Profile* Profile::FromBrowserContext(content::BrowserContext* browser_context) { // This is safe; this is the only implementation of the browser context. return static_cast<Profile*>(browser_context); } avi@ found that TestBrowserContext was added in r97875 after FromBrowserContext (in r94317). avi@ or phajdan.jr@, would either of you be able to update this to avoid the bad cast? Thanks!
,
May 23 2017
BTW, you missed the real bug in issue 721975. Followup on that bug.
,
May 31 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/fadbe57adf56100e2f7995ac7c94a9205fbc6aef commit fadbe57adf56100e2f7995ac7c94a9205fbc6aef Author: avi <avi@chromium.org> Date: Wed May 31 20:41:40 2017 Explicitly catch tests in chrome/ not using proper test profiles. Pretty much all chrome/ code assumes that BrowserContexts are Profiles because those are the BrowserContexts that Chrome instantiates. Explicitly catch test code that violates that assumption. BUG= 725276 , 721975 Review-Url: https://codereview.chromium.org/2899113002 Cr-Commit-Position: refs/heads/master@{#476007} [modify] https://crrev.com/fadbe57adf56100e2f7995ac7c94a9205fbc6aef/chrome/browser/profiles/profile.cc
,
May 31 2017
|
||
►
Sign in to add a comment |
||
Comment 1 by a...@chromium.org
, May 23 2017