Bug 173115

Summary: [iOS] LowPowerModeNotifier notifies client on non-main thread
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, beidson, commit-queue, ggaren, koivisto, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Chris Dumez
Reported 2017-06-08 14:50:02 PDT
LowPowerModeNotifier notifies client on non-main thread which clients do not expect and this is causing crashes.
Attachments
Patch (1.63 KB, patch)
2017-06-08 14:53 PDT, Chris Dumez
no flags
Patch (1.90 KB, patch)
2017-06-08 18:29 PDT, Chris Dumez
no flags
Patch (1.93 KB, patch)
2017-06-08 19:01 PDT, Chris Dumez
no flags
Chris Dumez
Comment 1 2017-06-08 14:50:19 PDT
Chris Dumez
Comment 2 2017-06-08 14:53:35 PDT
Ryosuke Niwa
Comment 3 2017-06-08 17:05:18 PDT
Comment on attachment 312348 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=312348&action=review > Source/WebCore/platform/ios/LowPowerModeNotifierIOS.mm:64 > + dispatch_async(dispatch_get_main_queue(), ^ { Why don't we just use callOnMainThread??
Chris Dumez
Comment 4 2017-06-08 18:08:42 PDT
Comment on attachment 312348 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=312348&action=review >> Source/WebCore/platform/ios/LowPowerModeNotifierIOS.mm:64 >> + dispatch_async(dispatch_get_main_queue(), ^ { > > Why don't we just use callOnMainThread?? We can but this is iOS specific code anyway.
Chris Dumez
Comment 5 2017-06-08 18:29:23 PDT
Chris Dumez
Comment 6 2017-06-08 19:01:43 PDT
Ryosuke Niwa
Comment 7 2017-06-08 19:52:47 PDT
(In reply to Chris Dumez from comment #4) > Comment on attachment 312348 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=312348&action=review > > >> Source/WebCore/platform/ios/LowPowerModeNotifierIOS.mm:64 > >> + dispatch_async(dispatch_get_main_queue(), ^ { > > > > Why don't we just use callOnMainThread?? > > We can but this is iOS specific code anyway. Sure but I think using callOnMainThread here would make the code read better.
WebKit Commit Bot
Comment 8 2017-06-08 19:59:45 PDT
Comment on attachment 312369 [details] Patch Clearing flags on attachment: 312369 Committed r217959: <http://trac.webkit.org/changeset/217959>
WebKit Commit Bot
Comment 9 2017-06-08 19:59:46 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.