Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Issue 2786103002: chromeos: Avoid DCHECK in ProxyResolutionServiceProvider. (Closed)

Created:
3 years, 8 months ago by Daniel Erat
Modified:
3 years, 8 months ago
Reviewers:
James Cook
CC:
chromium-reviews, tbansal+watch-data-reduction-proxy_chromium.org, oshima+watch_chromium.org, hashimoto+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

chromeos: Avoid DCHECK in ProxyResolutionServiceProvider. ProxyResolutionServiceProvider was incorrectly dereferencing a WeakPtr from a thread other than the one on which it was created. Make several of its private members be static and pass more data into them to avoid this. Also make tests create a network thread to catch issues like this. BUG=706665 Review-Url: https://codereview.chromium.org/2786103002 Cr-Commit-Position: refs/heads/master@{#461599} Committed: https://chromium.googlesource.com/chromium/src/+/8cfe70b3bca63aec509c39bf48c384e7eba3372b

Patch Set 1 #

Patch Set 2 : make tests multithreaded #

Patch Set 3 : merge with change to create net::ProxyService in tests #

Total comments: 10

Patch Set 4 : add comments and fix race #

Patch Set 5 : rename RunAllTasks to RunPendingTasks to avoid tricking future me #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -26 lines) Patch
M chromeos/dbus/services/proxy_resolution_service_provider.h View 1 2 3 1 chunk +17 lines, -2 lines 0 comments Download
M chromeos/dbus/services/proxy_resolution_service_provider.cc View 1 2 6 chunks +18 lines, -10 lines 0 comments Download
M chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc View 1 2 3 4 7 chunks +87 lines, -14 lines 0 comments Download

Messages

Total messages: 26 (19 generated)
Daniel Erat
sigh, i'd forgotten that WeakPtr can't be dereferenced across threads. :-/ let me know if ...
3 years, 8 months ago (2017-03-30 18:13:21 UTC) #6
Daniel Erat
mind taking another look at this now? https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc File chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc (right): https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc#newcode130 chromeos/dbus/services/proxy_resolution_service_provider_unittest.cc:130: RunAllTasks(network_task_runner); yuck. ...
3 years, 8 months ago (2017-04-01 00:19:19 UTC) #12
James Cook
LGTM https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider.cc File chromeos/dbus/services/proxy_resolution_service_provider.cc (right): https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider.cc#newcode206 chromeos/dbus/services/proxy_resolution_service_provider.cc:206: base::Passed(std::move(request)), notify_thread, notify_callback); optional: Add a comment near ...
3 years, 8 months ago (2017-04-03 15:30:24 UTC) #17
Daniel Erat
https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider.cc File chromeos/dbus/services/proxy_resolution_service_provider.cc (right): https://codereview.chromium.org/2786103002/diff/40001/chromeos/dbus/services/proxy_resolution_service_provider.cc#newcode206 chromeos/dbus/services/proxy_resolution_service_provider.cc:206: base::Passed(std::move(request)), notify_thread, notify_callback); On 2017/04/03 15:30:23, James Cook wrote: ...
3 years, 8 months ago (2017-04-04 00:01:37 UTC) #18
James Cook
still lgtm
3 years, 8 months ago (2017-04-04 00:13:39 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2786103002/80001
3 years, 8 months ago (2017-04-04 00:21:26 UTC) #23
commit-bot: I haz the power
3 years, 8 months ago (2017-04-04 01:24:57 UTC) #26
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/8cfe70b3bca63aec509c39bf48c3...

Powered by Google App Engine
This is Rietveld 408576698