|
|
DescriptionReplace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker.
Note to crash team: This CL is a refactor and has no intended behavior change.
This change was scripted by https://crbug.com/676387#c8.
... and then replaced by DCHECK_CURRENTLY_ON(UI) per request.
Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc
as its TestBrowserThreadBundle was initialized too late for TestingProfile's
constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to
using proper member stack ordering instead of trying to do more or less
that but not quite correctly with heap allocations.
BUG=676387
This CL was uploaded by git cl split.
Review-Url: https://codereview.chromium.org/2912003002
Cr-Commit-Position: refs/heads/master@{#476061}
Committed: https://chromium.googlesource.com/chromium/src/+/234cd78265fdc3965626d10b14d37e8b09b39c86
Patch Set 1 #
Total comments: 2
Patch Set 2 : DCHECK_CURRENTLY_ON(UI) #Patch Set 3 : fix PrintersManagerTest #
Total comments: 6
Patch Set 4 : review #
Messages
Total messages: 41 (28 generated)
The CQ bit was checked by gab@chromium.org to run a CQ dry run
Hi, this is an automated change made by https://crbug.com/676387#c8 and sharded across directories for OWNERS. No human has looked at this specific output yet, see cl description for things to watch for. If it LGTY, please CQ. If it didn't pass CQ dry-run it may be a simple patch failure or an IWYU failure from having this being a partial CL... please review anyways and a human will look at the failure (and ping for re-review if anything major is required..). It is known to compile all targets on Windows at r474679... manual tweaks will likely be required to smoothen things off, bear with me! Thanks! Gab
Dry run: CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
gab@chromium.org changed reviewers: + rdevlin.cronin@chromium.org - lazyboy@chromium.org
s/lazyboy (OOO)/rdevlin.cronin/
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2912003002/diff/1/chrome/browser/extensions/w... File chrome/browser/extensions/warning_badge_service.h (right): https://codereview.chromium.org/2912003002/diff/1/chrome/browser/extensions/w... chrome/browser/extensions/warning_badge_service.h:53: SEQUENCE_CHECKER(sequence_checker_); This class should only ever be used on the UI thread, so we should probably use ThreadChecker (or DCHECK_CURRENTLY_ON)
Description was changed from ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. Note-worthy for the reviewer: * SequenceChecker enforces thread-safety but not thread-affinity! If the classes that were updated are thread-affine (use thread local storage or a third-party API that does) they should be migrated to ThreadChecker instead. * ~NonThreadSafe() used to implcitly check in its destructor ~Sequence/ThreadChecker() doesn't by design. To keep this CL a no-op, an explicit check was added to the destructor of migrated classes. * NonThreadSafe used to provide access to subclasses, as such the |sequence_checker_| member was made protected rather than private where necessary. BUG=676387 This CL was uploaded by git cl split. R=lazyboy@chromium.org ========== to ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. (and then replaced by DCHECK_CURRENTLY_ON(UI) per request. BUG=676387 This CL was uploaded by git cl split. R=lazyboy@chromium.org ==========
https://codereview.chromium.org/2912003002/diff/1/chrome/browser/extensions/w... File chrome/browser/extensions/warning_badge_service.h (right): https://codereview.chromium.org/2912003002/diff/1/chrome/browser/extensions/w... chrome/browser/extensions/warning_badge_service.h:53: SEQUENCE_CHECKER(sequence_checker_); On 2017/05/30 20:04:25, Devlin wrote: > This class should only ever be used on the UI thread, so we should probably use > ThreadChecker (or DCHECK_CURRENTLY_ON) Done.
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_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was checked by gab@chromium.org to run a CQ dry run
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...
gab@chromium.org changed reviewers: + thestig@chromium.org
+Lei for corresponding fix to .../chromeos/printing/printers_manager_unittest.cc (it's TestBrowserThreadBundle was initialized too late for TestingProfile's constructor, switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations)
Description was changed from ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. (and then replaced by DCHECK_CURRENTLY_ON(UI) per request. BUG=676387 This CL was uploaded by git cl split. R=lazyboy@chromium.org ========== to ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. ... and then replaced by DCHECK_CURRENTLY_ON(UI) per request. Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc as its TestBrowserThreadBundle was initialized too late for TestingProfile's constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations. BUG=676387 This CL was uploaded by git cl split. R=lazyboy@chromium.org ==========
extensions lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linu...)
Looking... +skau who actually wrote the printing code, FYI.
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...
- R= line is out of date in the CL description. - "git cl split" is a thing? https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/printing/printers_manager_unittest.cc (right): https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:100: // Must be first to be alive throughout |profile_|'s lifetime. Just say "Must outlive |profile_|" ? https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:103: TestingProfile profile_; Add a comment to say this must outlive |manager_| ?
and otherwise lgtm
skau@chromium.org changed reviewers: + skau@chromium.org
lgtm Just a request for a comment on the constructor as I tend to forget how initializers are ordered. https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/printing/printers_manager_unittest.cc (right): https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:90: : manager_( Can you note that member initialization happens before initializer lists are evaluated? I don't remember what the spec says and it's not obvious that this is doing the right thing.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. ... and then replaced by DCHECK_CURRENTLY_ON(UI) per request. Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc as its TestBrowserThreadBundle was initialized too late for TestingProfile's constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations. BUG=676387 This CL was uploaded by git cl split. R=lazyboy@chromium.org ========== to ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. ... and then replaced by DCHECK_CURRENTLY_ON(UI) per request. Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc as its TestBrowserThreadBundle was initialized too late for TestingProfile's constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations. BUG=676387 This CL was uploaded by git cl split. ==========
https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... File chrome/browser/chromeos/printing/printers_manager_unittest.cc (right): https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:90: : manager_( On 2017/05/31 19:22:09, skau wrote: > Can you note that member initialization happens before initializer lists are > evaluated? I don't remember what the spec says and it's not obvious that this > is doing the right thing. This is not what's happening, members are initialized in their declaration order regardless of whether value is specified on the member (default or inline member init) or in the initializer list. I don't think I want to add a comment on that because this is used all over the codebase and explaining C++ everywhere this is used seems overkill. https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:100: // Must be first to be alive throughout |profile_|'s lifetime. On 2017/05/31 19:14:23, Lei Zhang wrote: > Just say "Must outlive |profile_|" ? Done. https://codereview.chromium.org/2912003002/diff/40001/chrome/browser/chromeos... chrome/browser/chromeos/printing/printers_manager_unittest.cc:103: TestingProfile profile_; On 2017/05/31 19:14:23, Lei Zhang wrote: > Add a comment to say this must outlive |manager_| ? Done.
The CQ bit was checked by gab@chromium.org to run a CQ dry run
The CQ bit was checked by gab@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from thestig@chromium.org, rdevlin.cronin@chromium.org, skau@chromium.org Link to the patchset: https://codereview.chromium.org/2912003002/#ps60001 (title: "review")
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 60001, "attempt_start_ts": 1496265584271260, "parent_rev": "d84ddac6a6b61604f0057ccb8046144287f795ec", "commit_rev": "234cd78265fdc3965626d10b14d37e8b09b39c86"}
Message was sent while issue was closed.
Description was changed from ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. ... and then replaced by DCHECK_CURRENTLY_ON(UI) per request. Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc as its TestBrowserThreadBundle was initialized too late for TestingProfile's constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations. BUG=676387 This CL was uploaded by git cl split. ========== to ========== Replace deprecated base::NonThreadSafe in chrome/browser/extensions in favor of SequenceChecker. Note to crash team: This CL is a refactor and has no intended behavior change. This change was scripted by https://crbug.com/676387#c8. ... and then replaced by DCHECK_CURRENTLY_ON(UI) per request. Which forced a fix to .../chromeos/printing/printers_manager_unittest.cc as its TestBrowserThreadBundle was initialized too late for TestingProfile's constructor (which would now crash in DCHECK_CURRENTLY_ON()), switched to using proper member stack ordering instead of trying to do more or less that but not quite correctly with heap allocations. BUG=676387 This CL was uploaded by git cl split. Review-Url: https://codereview.chromium.org/2912003002 Cr-Commit-Position: refs/heads/master@{#476061} Committed: https://chromium.googlesource.com/chromium/src/+/234cd78265fdc3965626d10b14d3... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/234cd78265fdc3965626d10b14d3... |