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

Issue 913203004: Clean up Android dangling g_child_thread pointer on shutdown. (Closed)

Created:
5 years, 10 months ago by aelias_OOO_until_Jul13
Modified:
5 years, 10 months ago
Reviewers:
Feng Qian, no sievers
CC:
chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clean up Android dangling g_child_thread pointer on shutdown. In the GPU process, GpuMain can return, destroying the process and thread, before ChildProcessService.onDestroy (which calls ShutdownThread) runs, leaving g_child_thread invalid. Set it to null on ChildThreadImpl destructor and check for that. BUG=458868 Committed: https://crrev.com/ed97167c14dc05f071895ec08848485d073d312a Cr-Commit-Position: refs/heads/master@{#316979}

Patch Set 1 #

Patch Set 2 : Make lock affect all code in ShutdownThread #

Patch Set 3 : Move nulling to top of destructor #

Total comments: 13

Patch Set 4 : sievers@ code review comments #

Patch Set 5 : Change comment text to address previous code review feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+22 lines, -7 lines) Patch
M content/child/child_thread_impl.cc View 1 2 3 4 4 chunks +22 lines, -7 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
Feng Qian
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode616 content/child/child_thread_impl.cc:616: return; Seems that only path to get here is ...
5 years, 10 months ago (2015-02-18 01:47:32 UTC) #2
Feng Qian
lgtm
5 years, 10 months ago (2015-02-18 02:38:02 UTC) #3
aelias_OOO_until_Jul13
Daniel, does this look sane to you as well?
5 years, 10 months ago (2015-02-18 02:42:32 UTC) #5
aelias_OOO_until_Jul13
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode616 content/child/child_thread_impl.cc:616: return; On 2015/02/18 at 01:47:32, Feng Qian wrote: > ...
5 years, 10 months ago (2015-02-18 02:46:52 UTC) #6
no sievers
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode610 content/child/child_thread_impl.cc:610: base::AutoLock lock(g_lazy_child_thread_lock.Get()); What about the two lazy instances (lock ...
5 years, 10 months ago (2015-02-18 19:19:43 UTC) #7
aelias_OOO_until_Jul13
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode610 content/child/child_thread_impl.cc:610: base::AutoLock lock(g_lazy_child_thread_lock.Get()); On 2015/02/18 at 19:19:42, sievers wrote: > ...
5 years, 10 months ago (2015-02-18 19:37:27 UTC) #8
no sievers
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode167 content/child/child_thread_impl.cc:167: base::LazyInstance<base::Lock> g_lazy_child_thread_lock = base::LazyInstance<base::Lock>::Leaky https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode174 content/child/child_thread_impl.cc:174: static const bool ...
5 years, 10 months ago (2015-02-18 20:48:30 UTC) #9
aelias_OOO_until_Jul13
https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc File content/child/child_thread_impl.cc (right): https://codereview.chromium.org/913203004/diff/40001/content/child/child_thread_impl.cc#newcode167 content/child/child_thread_impl.cc:167: base::LazyInstance<base::Lock> g_lazy_child_thread_lock = On 2015/02/18 20:48:30, sievers wrote: > ...
5 years, 10 months ago (2015-02-19 01:00:28 UTC) #11
no sievers
lgtm
5 years, 10 months ago (2015-02-19 01:06:17 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/913203004/80001
5 years, 10 months ago (2015-02-19 01:16:17 UTC) #15
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 10 months ago (2015-02-19 02:50:41 UTC) #16
commit-bot: I haz the power
5 years, 10 months ago (2015-02-19 02:51:31 UTC) #17
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ed97167c14dc05f071895ec08848485d073d312a
Cr-Commit-Position: refs/heads/master@{#316979}

Powered by Google App Engine
This is Rietveld 408576698