Commit e0dbf386 authored by Guido Urdaneta's avatar Guido Urdaneta Committed by Commit Bot

Do not fire webrtc log upload null callbacks.

Nested null callbacks can cause crashes.

Bug: 1090007
Change-Id: I8197cafb9fb74e6471cd83ee0c1619662227acd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2241122Reviewed-by: default avatarMarina Ciocea <marinaciocea@chromium.org>
Commit-Queue: Guido Urdaneta <guidou@chromium.org>
Cr-Commit-Position: refs/heads/master@{#777323}
parent b48f4324
......@@ -491,9 +491,14 @@ void WebRtcLoggingController::DoUploadLogAndRtpDumps(
base::UmaHistogramSparse("WebRtcTextLogging.UploadFailureReason",
WebRtcLogUploadFailureReason::kInvalidState);
}
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(callback, false, "",
"Logging not stopped or no log open."));
// Do not fire callback if it is null. Nesting null callbacks is not
// allowed, as it can lead to crashes. See https://crbug.com/1071475
if (!callback.is_null()) {
base::SequencedTaskRunnerHandle::Get()->PostTask(
FROM_HERE, base::BindOnce(callback, false, "",
"Logging not stopped or no log open."));
}
return;
}
......
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