Bug 204770 - [iOS] Calls to the device motion API should be done in the UI process
Summary: [iOS] Calls to the device motion API should be done in the UI process
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Per Arne Vollan
URL:
Keywords: InRadar
Depends on: 209831
Blocks: 206085 206387
  Show dependency treegraph
 
Reported: 2019-12-02 15:09 PST by Per Arne Vollan
Modified: 2020-03-31 13:57 PDT (History)
10 users (show)

See Also:


Attachments
Patch (40.76 KB, patch)
2019-12-02 15:23 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (41.02 KB, patch)
2019-12-02 16:23 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (48.75 KB, patch)
2019-12-02 18:22 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (26.12 KB, patch)
2019-12-09 16:24 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (26.86 KB, patch)
2019-12-10 10:43 PST, Per Arne Vollan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Per Arne Vollan 2019-12-02 15:09:19 PST
The device motion API on iOS is communicating with iohideventsystem. Since mach lookup to this daemon will be closed, the calls to this API should be moved from the WebContent process to the UI process.
Comment 1 Radar WebKit Bug Importer 2019-12-02 15:09:58 PST
<rdar://problem/57572913>
Comment 2 Per Arne Vollan 2019-12-02 15:23:33 PST
Created attachment 384662 [details]
Patch
Comment 3 Per Arne Vollan 2019-12-02 16:23:14 PST
Created attachment 384670 [details]
Patch
Comment 4 Per Arne Vollan 2019-12-02 18:22:58 PST
Created attachment 384673 [details]
Patch
Comment 5 Per Arne Vollan 2019-12-09 16:24:20 PST
Created attachment 385207 [details]
Patch
Comment 6 Per Arne Vollan 2019-12-10 10:43:59 PST
Created attachment 385285 [details]
Patch
Comment 7 Brent Fulgham 2019-12-10 16:48:02 PST
Comment on attachment 385285 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385285&action=review

r=me, but please consider changing those bare pointers (perhaps even in a follow-up patch).

> Source/WebCore/platform/ios/DeviceMotionClientIOS.h:55
> +    DeviceMotionController* m_controller { nullptr };

I'm a little suspicious of these bare pointers. Could they be WeakPtrs?
Comment 8 Per Arne Vollan 2019-12-10 16:55:34 PST
(In reply to Brent Fulgham from comment #7)
> Comment on attachment 385285 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=385285&action=review
> 
> r=me, but please consider changing those bare pointers (perhaps even in a
> follow-up patch).
> 
> > Source/WebCore/platform/ios/DeviceMotionClientIOS.h:55
> > +    DeviceMotionController* m_controller { nullptr };
> 
> I'm a little suspicious of these bare pointers. Could they be WeakPtrs?

I think they can be made WeakPtrs, I will look into that :)

Thanks for reviewing!
Comment 9 Per Arne Vollan 2019-12-10 16:58:46 PST
(In reply to Brent Fulgham from comment #7)
> Comment on attachment 385285 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=385285&action=review
> 
> r=me, but please consider changing those bare pointers (perhaps even in a
> follow-up patch).
> 
> > Source/WebCore/platform/ios/DeviceMotionClientIOS.h:55
> > +    DeviceMotionController* m_controller { nullptr };
> 
> I'm a little suspicious of these bare pointers. Could they be WeakPtrs?

Filed https://bugs.webkit.org/show_bug.cgi?id=205093.
Comment 10 WebKit Commit Bot 2019-12-10 17:35:22 PST
Comment on attachment 385285 [details]
Patch

Clearing flags on attachment: 385285

Committed r253357: <https://trac.webkit.org/changeset/253357>
Comment 11 WebKit Commit Bot 2019-12-10 17:35:24 PST
All reviewed patches have been landed.  Closing bug.
Comment 12 Chris Dumez 2020-03-31 13:20:15 PDT
Comment on attachment 385285 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=385285&action=review

> Source/WebCore/ChangeLog:3
> +        [iOS] Calls to the device motion API should be done in the UI process

This change seems to have badly broken the device motion API :(

see <rdar://problem/60720953>.