New issue
Advanced search Search tips
Starred by 1 user

Issue metadata

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



Sign in to add a comment
link

Issue 912502: [ios] DCHECK hit in constructor of ChromeIOSTranslateClient when APP startup.

Reported by mrsuyi@chromium.org, Dec 6 Project Member

Issue description

Chrome Version: 73.0.3633.0
OS:iOS

DCHECK code:
https://cs.chromium.org/chromium/src/ios/chrome/browser/translate/chrome_ios_translate_client.mm?rcl=e9a20639d6eb804521fd2c2760b510aa4d192ef2&l=83

What steps will reproduce the problem?
(1)Run "gclient sync" and rebuild the APP;
(2)Start the APP on simulator;
(3)DCHECK is hit;
(4)Restart the APP and the DCHECK won't be hit anymore.
 

Comment 1 by thegreenfrog@chromium.org, Dec 6

Owner: anthonyvd@chromium.org
Status: Assigned (was: Untriaged)
Anthony could you PTAL?

Comment 2 by mahmadi@chromium.org, Dec 6

Cc: anthonyvd@chromium.org
Owner: mahmadi@chromium.org
Status: Started (was: Assigned)
This is caused by my change. I will take a look.

Comment 3 by pkl@chromium.org, Dec 7

mahmadi: Does this affect M72?

Comment 4 by mahmadi@chromium.org, Dec 10

Comment 5 by bugdroid1@chromium.org, Dec 11

Project Member
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2545cc4292cd8343302b111104201f60a1701a63

commit 2545cc4292cd8343302b111104201f60a1701a63
Author: Moe Ahmadi <mahmadi@chromium.org>
Date: Tue Dec 11 12:31:31 2018

[iOS][Translate] Moves LanguageSelectionHnadler out of infobarcoordinator

Instead of passing the id<LanguageSelectionHandler> to the
ChromeIOSTranslateClient during construction which is prone to error due to
dependency on the order in which ChromeIOSTranslateClient and
the InfobarCoordinator are initialized, this CL modifies the
LanguageSelectionCoordinator to observe the WebStateList and set/unset the
id<LanguageSelectionHandler> on instances of ChromeIOSTranslateClient when
appropriate.

This fixes a DCHECK during ChromeIOSTranslateClient construction and helps
make the feature more self-contained as the InfobarCoordinator/Mediator no
longer needs to know about the languageSelectionHandler.

TBR=rohitrao@

Bug:  912502 
Change-Id: Id3769f10a0ed638821afdd9578bd263700768299
Reviewed-on: https://chromium-review.googlesource.com/c/1366467
Commit-Queue: Moe Ahmadi <mahmadi@chromium.org>
Reviewed-by: edchin <edchin@chromium.org>
Reviewed-by: Sergio Collazos <sczs@chromium.org>
Reviewed-by: anthonyvd <anthonyvd@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615500}
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/translate/before_translate_infobar_controller.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/translate/chrome_ios_translate_client.h
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/translate/chrome_ios_translate_client.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/browser_view_controller.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/infobars/BUILD.gn
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/infobars/infobar_container_coordinator.h
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/infobars/infobar_container_coordinator.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/infobars/infobar_container_mediator.h
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/infobars/infobar_container_mediator.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/main/BUILD.gn
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/main/browser_coordinator.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/translate/BUILD.gn
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/translate/language_selection_coordinator.h
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/translate/language_selection_coordinator.mm
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/translate/language_selection_mediator.h
[modify] https://crrev.com/2545cc4292cd8343302b111104201f60a1701a63/ios/chrome/browser/ui/translate/language_selection_mediator.mm

Comment 6 by mahmadi@chromium.org, Jan 23

Status: Fixed (was: Started)

Sign in to add a comment