forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reland "Add std::move() to local base::Callback instances in //content"
This reverts commit 9b4af06. Reason for revert: This does not seem like the root cause. Original change's description: > Revert "Add std::move() to local base::Callback instances in //content" > > This reverts commit c55a5a4. > > Reason for revert: Speculative revert because of renderer crashes across > the board on Android with: > [FATAL:weak_ptr.cc(26)] Check failed: sequence_checker_.CalledOnValidSequence(). WeakPtrs must be checked on the same sequenced thread > > Original change's description: > > Add std::move() to local base::Callback instances in //content > > > > This adds std::move() around base::Callback instances where it looks > > relevant, by applying `base_bind_rewriters -rewriter=add_std_move`. > > https://crrev.com/c/970143, plus manual fixes. > > > > Example: > > // Before: > > void set_callback(base::Closure cb) { g_cb = cb; } > > void RunCallback(base::Callback<void(int)> cb) { cb.Run(42); } > > void Post() { > > base::Closure task = base::Bind(&Foo); > > PostTask(FROM_HERE, task); > > } > > > > // After: > > void set_callback(base::Closure cb) { g_cb = std::move(cb); } > > void RunCallback(base::Callback<void(int)> cb) { std::move(cb).Run(42); } > > void Post() { > > base::Closure task = base::Bind(&Foo); > > PostTask(FROM_HERE, std::move(task)); > > } > > > > Specifically, it inserts std::move() if: > > - it's a pass-by-value parameter or non-const local variable. > > - the occurrence is the latest in its control flow. > > - no pointer is taken for the variable. > > - no capturing lambda exists for the variable. > > > > Change-Id: I53853f9b9c8604994e2065af66ed4607af9c12ed > > Reviewed-on: https://chromium-review.googlesource.com/970056 > > Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> > > Commit-Queue: Taiju Tsuiki <tzik@chromium.org> > > Cr-Commit-Position: refs/heads/master@{#544356} > > TBR=kinuko@chromium.org,tzik@chromium.org > > Change-Id: Ie7392a2229e1ef0f740d8958f8fe43d99b0460e9 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Reviewed-on: https://chromium-review.googlesource.com/972321 > Reviewed-by: Tommy Nyquist <nyquist@chromium.org> > Commit-Queue: Tommy Nyquist <nyquist@chromium.org> > Cr-Commit-Position: refs/heads/master@{#544527} TBR=kinuko@chromium.org,nyquist@chromium.org,tzik@chromium.org Change-Id: I0aabd6032a070a28d0e5a4f796f37fe18f1e5cd4 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/972302 Reviewed-by: Tommy Nyquist <nyquist@chromium.org> Commit-Queue: Tommy Nyquist <nyquist@chromium.org> Cr-Commit-Position: refs/heads/master@{#544536}
- Loading branch information
1 parent
b5e2e22
commit 4b749d0
Showing
141 changed files
with
443 additions
and
378 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.