[Live Caption] Speculative fix of a crash in GetNumLinesInLabel.
An EXCEPTION_ACCESS_VIOLATION_READ crash was reported in CaptionBubble::GetNumLinesInLabel. I believe the cause is that CaptionBubble::GetNumLinesInLabel calls Label::GetRequiredLines, which is a const function. To fix this, I mark CaptionBubble::GetNumLinesInLabel as const. While I am here, I am also performing a check that observer_ is not null in CaptionBubbleModel::CommitPartialText, which would cause a different crash. Bug: 1055150, 1096366 Change-Id: Ic039de789f4ce5dc34b3dff0ee11e38bcfabb4b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2252198 Commit-Queue: Abigail Klein <abigailbklein@google.com> Reviewed-by:Katie Dektar <katie@chromium.org> Reviewed-by:
Dominic Mazzoni <dmazzoni@chromium.org> Cr-Commit-Position: refs/heads/master@{#780003}
Showing
Please register or sign in to comment