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

Issue 687507 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocking:
issue 514752



Sign in to add a comment

Crash when going incognito with NTPTilesInInstantService enabled

Project Member Reported by treib@chromium.org, Feb 1 2017

Issue description

Repro:
Run Chrome with --enable-features=NTPTilesInInstantService
Click the profile button in the top right -> "Manage people"
Hit NOTREACHED in favicon_service_factory.cc(45): Check failed: false. This profile is OffTheRecord

Looks like for whatever reason, the profile switcher creates an incognito profile, and its InstantService creates a MostVisitedSites instance, which in turns causes the NOTREACHED in FaviconServiceFactory.


Possible solutions:

- In InstantService, don't create MostVisitedSites if we're off the record. (A bit weird IMO - clients shouldn't have to care about that. If we go this way, we should at least put a comment on the MVFactory and/or rename the method.)

- In ChromeMostVisitedSitesFactory, if we're off the record, don't create a MostVisitedSites instance at all, similar to what TopSites does. (Preferred solution IMO.)

- In ChromeMostVisitedSitesFactory, if we're off the record, pass a null FaviconService to the MostVisitedSites (this seems weird and inconsistent).
 

Comment 1 by treib@chromium.org, Feb 1 2017

Chris or Mikel, any opinions or alternative suggestions? Otherwise I'd go with the second solution above.
I agree that #2 seems best. It's better than #1.

Our position so far has, I think, been that tiles don't exist in incognito mode, which rules out #3.

Is there not a crash when directly opening an incognito tab?

Comment 3 by treib@chromium.org, Feb 1 2017

Summary: Crash when going incognito with NTPTilesInInstantService enabled (was: Crash when opening profile switcher with NTPTilesInInstantService enabled)
Yup, opening an incognito windows results in a similar crash. That's an even easier repro :)

Comment 4 by treib@chromium.org, Feb 1 2017

Status: Started (was: Assigned)

Comment 5 by treib@chromium.org, Feb 1 2017

Blocking: 514752
Project Member

Comment 6 by bugdroid1@chromium.org, Feb 1 2017

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

commit 837e405817fcb63cd3652381d3fb8aae3c28e16d
Author: treib <treib@chromium.org>
Date: Wed Feb 01 13:08:21 2017

Don't create MostVisitedSites in incognito

With NTPTilesInInstantService enabled, InstantService attempts to create
a MostVisitedSites instance even in incognito profiles, which caused a
crash.
This CL changes ChromeMostVisitedSitesFactory to return nullptr for
incognito profiles, and also updates InstantService to properly handle
the returned nullptr.

BUG= 687507 

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

[modify] https://crrev.com/837e405817fcb63cd3652381d3fb8aae3c28e16d/chrome/browser/ntp_tiles/chrome_most_visited_sites_factory.cc
[modify] https://crrev.com/837e405817fcb63cd3652381d3fb8aae3c28e16d/chrome/browser/search/instant_service.cc

Comment 7 by treib@chromium.org, Feb 1 2017

Status: Fixed (was: Started)

Sign in to add a comment