Commit 582d457d authored by Eugene But's avatar Eugene But Committed by Commit Bot

[ios] Remove DCHECK from dispatchInstallationNotifierBlock

DownloadManagerCoordinatorTest.CloseInProgressDownload test fails,
because dispatchInstallationNotifierBlock schedules a delayed block
execution and that block expect proper setup of WebThread. The
expectation flakily fails if tests tear down WebThread environment.

The expectation to have WebThread set up is incorrect for delayed block
of code in tests and production, because WebThread can be legitimately
torn down.

This CL removes that DCHECK, but keeps all other DCHECKs that are still
active as long as InstallationNotifier object is alive.

Bug: 1059885
Change-Id: I9b4b257a5b654923d52840bb314d36ff243269e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2095349
Auto-Submit: Eugene But <eugenebut@chromium.org>
Reviewed-by: default avatarSylvain Defresne <sdefresne@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#748703}
parent bf9e5d77
...@@ -161,7 +161,6 @@ const net::BackoffEntry::Policy kPollingBackoffPolicy = { ...@@ -161,7 +161,6 @@ const net::BackoffEntry::Policy kPollingBackoffPolicy = {
__weak InstallationNotifier* weakSelf = self; __weak InstallationNotifier* weakSelf = self;
[_dispatcher dispatchAfter:delayInNSec [_dispatcher dispatchAfter:delayInNSec
withBlock:^{ withBlock:^{
DCHECK_CURRENTLY_ON(web::WebThread::UI);
InstallationNotifier* strongSelf = weakSelf; InstallationNotifier* strongSelf = weakSelf;
if (blockId == [strongSelf lastCreatedBlockId]) { if (blockId == [strongSelf lastCreatedBlockId]) {
[strongSelf pollForTheInstallationOfApps]; [strongSelf pollForTheInstallationOfApps];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment