Bug 234989

Summary: WebKit::nsTextAlignmentFromTextAlignment() falls through ASSERT_NOT_REACHED()
Product: WebKit Reporter: David Kilzer (:ddkilzer) <ddkilzer>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, darin, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 234932    
Bug Blocks:    
Attachments:
Description Flags
Patch none

David Kilzer (:ddkilzer)
Reported 2022-01-07 14:41:33 PST
WebKit::nsTextAlignmentFromTextAlignment() falls through ASSERT_NOT_REACHED(). In the `default` case, `nsTextAlignment` is returned uninitialized. static NSTextAlignment nsTextAlignmentFromTextAlignment(TextAlignment textAlignment) { NSTextAlignment nsTextAlignment; switch (textAlignment) { case NoAlignment: nsTextAlignment = NSTextAlignmentNatural; break; case LeftAlignment: nsTextAlignment = NSTextAlignmentLeft; break; case RightAlignment: nsTextAlignment = NSTextAlignmentRight; break; case CenterAlignment: nsTextAlignment = NSTextAlignmentCenter; break; case JustifiedAlignment: nsTextAlignment = NSTextAlignmentJustified; break; default: ASSERT_NOT_REACHED(); } return nsTextAlignment; } See Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm.
Attachments
Patch (2.13 KB, patch)
2022-01-19 10:51 PST, Chris Dumez
no flags
Radar WebKit Bug Importer
Comment 1 2022-01-07 14:41:59 PST
Chris Dumez
Comment 2 2022-01-19 10:51:12 PST
EWS
Comment 3 2022-01-19 14:21:48 PST
Committed r288241 (246195@main): <https://commits.webkit.org/246195@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 449494 [details].
Note You need to log in before you can comment on or make changes to this bug.