Descriptionbase: 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. #
Messages
Total messages: 14 (6 generated)
|