Bug 213145 - [iOS] Preferences are not being observed if the process pool is being created after activation
Summary: [iOS] Preferences are not being observed if the process pool is being created...
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:
Blocks:
 
Reported: 2020-06-12 13:36 PDT by Per Arne Vollan
Modified: 2020-06-12 15:38 PDT (History)
2 users (show)

See Also:


Attachments
Patch (2.85 KB, patch)
2020-06-12 13:43 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (2.47 KB, patch)
2020-06-12 14:05 PDT, Per Arne Vollan
bfulgham: review+
Details | Formatted Diff | Diff
Patch (1.90 KB, patch)
2020-06-12 14:26 PDT, Per Arne Vollan
no flags Details | Formatted Diff | Diff
Patch (2.04 KB, patch)
2020-06-12 14:29 PDT, 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 2020-06-12 13:36:13 PDT
If the app is creating the Web process pool after being activated, preferences will not be observed until the app is being backgrounded and then foregrounded again, since the preference observer is initialized when handling the app activation notification.
Comment 1 Per Arne Vollan 2020-06-12 13:36:43 PDT
rdar://problem/63720477
Comment 2 Per Arne Vollan 2020-06-12 13:43:26 PDT
Created attachment 401774 [details]
Patch
Comment 3 Per Arne Vollan 2020-06-12 14:05:21 PDT
Created attachment 401778 [details]
Patch
Comment 4 Brent Fulgham 2020-06-12 14:16:19 PDT
Comment on attachment 401778 [details]
Patch

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

r=me

> Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:474
> +            startObservingPreferenceChanges();

Do we need to do anything special to stop observing preferences in this case? Or is it handled automatically by the normal code paths?
Comment 5 Per Arne Vollan 2020-06-12 14:26:07 PDT
Created attachment 401782 [details]
Patch
Comment 6 Per Arne Vollan 2020-06-12 14:29:12 PDT
Created attachment 401783 [details]
Patch
Comment 7 Per Arne Vollan 2020-06-12 14:30:46 PDT
(In reply to Brent Fulgham from comment #4)
> Comment on attachment 401778 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=401778&action=review
> 
> r=me
> 
> > Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm:474
> > +            startObservingPreferenceChanges();
> 
> Do we need to do anything special to stop observing preferences in this
> case? Or is it handled automatically by the normal code paths?

Actually, we will observe preference changes during the full lifetime of the UI process.

Thanks for reviewing!
Comment 8 EWS 2020-06-12 15:38:31 PDT
Committed r262984: <https://trac.webkit.org/changeset/262984>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 401782 [details].