Commit 682257e6 authored by Greg Thompson's avatar Greg Thompson Committed by Chromium LUCI CQ

[Mac] Crash avoidance in callback binding.

r830353 tried to reduce refcount bumps, but perhaps that was wrong.

R=fdoray@chromium.org

Bug: 1156603
Change-Id: Ib9a3daa6ea1f087fef14ddeb5e49e74ef875dba7
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596305
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarJan Wilken Dörrie <jdoerrie@chromium.org>
Auto-Submit: Greg Thompson <grt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#846044}
parent faa04cbc
......@@ -76,14 +76,13 @@ void DirectoryMonitor::Start(Callback on_change_callback) {
&base::FilePathWatcher::Watch, base::Unretained(watcher_.get()),
std::move(install_dir_), watch_type,
base::BindRepeating(
[](base::SequencedTaskRunner* main_sequence,
[](scoped_refptr<base::SequencedTaskRunner> main_sequence,
const Callback& on_change_callback, const base::FilePath&,
bool error) {
main_sequence->PostTask(
FROM_HERE, base::BindOnce(on_change_callback, error));
},
base::RetainedRef(base::SequencedTaskRunnerHandle::Get()),
on_change_callback)),
base::SequencedTaskRunnerHandle::Get(), on_change_callback)),
base::BindOnce(
[](const Callback& on_change_callback, bool start_result) {
if (!start_result)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment