Summary: | Crash under WebCore::platformDefaultLanguage() when using Arabic language | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mike Thole <mthole> | ||||
Component: | WebCore Misc. | Assignee: | Mike Thole <mthole> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap | ||||
Priority: | P1 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | All | ||||||
Attachments: |
|
Created attachment 72863 [details]
Proposed patch
Comment on attachment 72863 [details]
Proposed patch
Oops.
Committed revision 71264. Comment on attachment 72863 [details] Proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=72863&action=review > WebCore/platform/mac/Language.mm:62 > + NSString *httpStyleLanguageCode = nil; It would be clearer to define this just before it’s initialized rather than putting the definition at the top of the function. If you did that it would be clear you need not set it to nil since it’s already initialized in all code paths. > WebCore/platform/mac/Language.mm:79 > + } > + else We put the } on the same line as the “else” in WebKit coding style. |
After choosing the Arabic locale, launching Safari and navigating somewhere will cause a crash: 1 libobjc.A.dylib 0x7fff82ae8318 objc_msgSend_vtable13 + 0x10 > 2 com.apple.WebCore 0x101e0a5bd WebCore::platformDefaultLanguage() + 0x3d (Language.mm:100) 3 com.apple.WebCore 0x101e09e38 WebCore::defaultLanguage() + 0x38 (Language.cpp:72) 4 com.apple.WebKit 0x1012c9cc9 +[NSUserDefaults(WebNSUserDefaultsExtras) _webkit_preferredLanguageCode] + 0x19 (WebNSUserDefaultsExtras.mm:40) 5 com.apple.WebKit 0x1012fb835 +[WebView(WebPrivate) _standardUserAgentWithApplicationName:] + 0x55 (WebView.mm:550) 6 com.apple.Safari.framework 0x10020ae15 Safari::SWebView::defaultUserAgent() + 0x47 (SWebView.mac.mm:166)