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

Issue 1559353002: base: Fix DCHECK when thread creation fails (Closed)

Created:
4 years, 11 months ago by Sami
Modified:
4 years, 11 months ago
Reviewers:
danakj
CC:
chromium-reviews, sadrul, vmpstr+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

base: Fix DCHECK when thread creation fails When thread creation fails[1], base::Thread tries to delete an unbound MessageLoop on the originating thread. If that thread already has a MessageLoop, this trips a DCHECK in MessageLoop's destructor that checks against having two MessageLoops on the same thread. This patch adjusts the DCHECK logic to ignore destroying unbound message loops on a thread that already has a separate message loop (which it was already trying to do according to the comments). [1] https://code.google.com/p/chromium/codesearch#chromium/src/base/threading/thread.cc&l=116 BUG=480100 Committed: https://crrev.com/3ae7dab6fb40b0fe1d5c18eda603a89a455394fd Cr-Commit-Position: refs/heads/master@{#368057}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Fix tls resetting, add test. #

Total comments: 4

Patch Set 3 : Tweak assert. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+20 lines, -4 lines) Patch
M base/message_loop/message_loop.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
M base/message_loop/message_loop.cc View 1 2 2 chunks +7 lines, -4 lines 0 comments Download
M base/message_loop/message_loop_unittest.cc View 1 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
Sami
4 years, 11 months ago (2016-01-05 15:54:57 UTC) #3
danakj
https://codereview.chromium.org/1559353002/diff/1/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1559353002/diff/1/base/message_loop/message_loop.cc#newcode138 base/message_loop/message_loop.cc:138: DCHECK(current() == this || !pump_); This no longer captures ...
4 years, 11 months ago (2016-01-05 19:40:15 UTC) #4
Sami
https://codereview.chromium.org/1559353002/diff/1/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1559353002/diff/1/base/message_loop/message_loop.cc#newcode138 base/message_loop/message_loop.cc:138: DCHECK(current() == this || !pump_); On 2016/01/05 19:40:15, danakj ...
4 years, 11 months ago (2016-01-06 10:56:19 UTC) #5
danakj
LGTM w/ 1 comment https://codereview.chromium.org/1559353002/diff/20001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1559353002/diff/20001/base/message_loop/message_loop.cc#newcode139 base/message_loop/message_loop.cc:139: DCHECK((pump_ && current() == this) ...
4 years, 11 months ago (2016-01-06 21:03:22 UTC) #6
Sami
https://codereview.chromium.org/1559353002/diff/20001/base/message_loop/message_loop.cc File base/message_loop/message_loop.cc (right): https://codereview.chromium.org/1559353002/diff/20001/base/message_loop/message_loop.cc#newcode139 base/message_loop/message_loop.cc:139: DCHECK((pump_ && current() == this) || current() != this); ...
4 years, 11 months ago (2016-01-07 10:46:10 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1559353002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1559353002/40001
4 years, 11 months ago (2016-01-07 10:46:37 UTC) #10
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-07 12:15:53 UTC) #12
commit-bot: I haz the power
4 years, 11 months ago (2016-01-07 12:16:52 UTC) #14
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/3ae7dab6fb40b0fe1d5c18eda603a89a455394fd
Cr-Commit-Position: refs/heads/master@{#368057}

Powered by Google App Engine
This is Rietveld 408576698