|
|
Chromium Code Reviews|
Created:
4 years, 4 months ago by gab Modified:
4 years, 4 months ago Reviewers:
Mark Seaborn CC:
chromium-reviews Base URL:
https://chromium.googlesource.com/chromium/src.git@b6_sequenced_worker_pool_redirection Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse a raw pointer instead of Singleton for PnaclHost and leak it.
This CL was brought up by issue 631547 which highlights that PnaclHost is
sometimes deleted off-thread (on the main thread at static unitilization instead
of the IO thread it's bound to) with live WeakPtrs.
Issue 631547 results in random flakes for all browser_tests exercising this
code one way or another, it should be fixed by this.
The WeakPtrs served no purpose as the task running system is long gone by the time
static destruction kicks in and no task would thus ever have been cancelled through
them.
It already leaked its state on static destruction from AtExitManager.
It could instead have used base::LeakySingletonTraits but it really doesn't
need to even be a Singleton per being intended for single-threaded usage.
So this CL:
- Replaces WeakPtrs usage with Unretained(this).
- Adds missing thread_checker_ calls now that they will no longer be implicitly
provided by GetWeakPtr() calls.
- Replaces Singleton with a leaked static raw pointer.
- Replace callback_forward.h include by callback.h (typedefs need it
and were getting it transitively through singleton.h->at_exit.h).
- The attempted un-initialization through DeInitIfSafe() remains the same.
BUG=631547
Committed: https://crrev.com/459e9aa8dd4682aaaf5b8bcbb0fd030632b2d787
Cr-Commit-Position: refs/heads/master@{#409365}
Patch Set 1 #Patch Set 2 : annotate leak #Patch Set 3 : fix include and tests #Patch Set 4 : git cl format #
Total comments: 2
Patch Set 5 : typo #
Dependent Patchsets: Messages
Total messages: 25 (19 generated)
The CQ bit was checked by gab@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - The attempted uninitialization logic through DeInitIfSafe() remains the same. BUG=631547 ==========
The CQ bit was checked by gab@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...) mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_comp...)
The CQ bit was checked by gab@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - The attempted uninitialization logic through DeInitIfSafe() remains the same. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ==========
gab@chromium.org changed reviewers: + mseaborn@chromium.org
@mseaborn: PTAL, this addresses waterfall flakes caused by PNaclHost.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
> @mseaborn: PTAL, this addresses waterfall flakes caused by PNaclHost. Can you mention in the commit message that this fixes a flaky failure? Thanks -- LGTM. https://codereview.chromium.org/2207683002/diff/60001/components/nacl/browser... File components/nacl/browser/pnacl_host.h (right): https://codereview.chromium.org/2207683002/diff/60001/components/nacl/browser... components/nacl/browser/pnacl_host.h:47: // time, it will be too late when AtExitManager kicks in anways so subscribing Typo: "anyway"
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code somehow, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ==========
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code somehow, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code one way or another, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ==========
On 2016/08/02 21:47:32, Mark Seaborn wrote: > > @mseaborn: PTAL, this addresses waterfall flakes caused by PNaclHost. > > Can you mention in the commit message that this fixes a flaky failure? Thanks > -- LGTM. Done, thanks. https://codereview.chromium.org/2207683002/diff/60001/components/nacl/browser... File components/nacl/browser/pnacl_host.h (right): https://codereview.chromium.org/2207683002/diff/60001/components/nacl/browser... components/nacl/browser/pnacl_host.h:47: // time, it will be too late when AtExitManager kicks in anways so subscribing On 2016/08/02 21:47:31, Mark Seaborn wrote: > Typo: "anyway" Done.
The CQ bit was checked by gab@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mseaborn@chromium.org Link to the patchset: https://codereview.chromium.org/2207683002/#ps80001 (title: "typo")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Message was sent while issue was closed.
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code one way or another, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code one way or another, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code one way or another, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 ========== to ========== Use a raw pointer instead of Singleton for PnaclHost and leak it. This CL was brought up by issue 631547 which highlights that PnaclHost is sometimes deleted off-thread (on the main thread at static unitilization instead of the IO thread it's bound to) with live WeakPtrs. Issue 631547 results in random flakes for all browser_tests exercising this code one way or another, it should be fixed by this. The WeakPtrs served no purpose as the task running system is long gone by the time static destruction kicks in and no task would thus ever have been cancelled through them. It already leaked its state on static destruction from AtExitManager. It could instead have used base::LeakySingletonTraits but it really doesn't need to even be a Singleton per being intended for single-threaded usage. So this CL: - Replaces WeakPtrs usage with Unretained(this). - Adds missing thread_checker_ calls now that they will no longer be implicitly provided by GetWeakPtr() calls. - Replaces Singleton with a leaked static raw pointer. - Replace callback_forward.h include by callback.h (typedefs need it and were getting it transitively through singleton.h->at_exit.h). - The attempted un-initialization through DeInitIfSafe() remains the same. BUG=631547 Committed: https://crrev.com/459e9aa8dd4682aaaf5b8bcbb0fd030632b2d787 Cr-Commit-Position: refs/heads/master@{#409365} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/459e9aa8dd4682aaaf5b8bcbb0fd030632b2d787 Cr-Commit-Position: refs/heads/master@{#409365} |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
