Bug 183075

Summary: Release assertion in WebPage::updatePreferences
Product: WebKit Reporter: Ryosuke Niwa <rniwa>
Component: WebKit2Assignee: Ryosuke Niwa <rniwa>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, beidson, cdumez, commit-queue, mitz, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch for landing
none
Patch for landing rniwa: commit-queue+

Description Ryosuke Niwa 2018-02-22 23:25:26 PST
After https://trac.webkit.org/changeset/228589, some people are hitting release assertions.
There appears to be a race condition between UI process and WebContent process's preferences being synced vs web view being created.

<rdar://problem/37790257>
Comment 1 Ryosuke Niwa 2018-02-22 23:34:07 PST
Created attachment 334506 [details]
Patch
Comment 2 Ryosuke Niwa 2018-02-24 16:24:32 PST
Created attachment 334568 [details]
Patch
Comment 3 youenn fablet 2018-02-26 10:43:37 PST
Comment on attachment 334568 [details]
Patch

r=me with non sw-enabled build fix.

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

> Source/WebKit/StorageProcess/StorageProcess.cpp:191
> +        return;

The work done here seems harmless so maybe we can do it anyway, especially since we are disabling any IPC to Messages::WebSWServerToContextConnection?
I am not familiar with this routine but maybe there is a chance for a race condition somehow so that we initialize the website data store first and get the entitlement later on.
Comment 4 Chris Dumez 2018-02-26 10:44:40 PST

*** This bug has been marked as a duplicate of bug 183135 ***
Comment 5 Chris Dumez 2018-02-26 10:49:15 PST
Comment on attachment 334568 [details]
Patch

lgtm too.
Comment 6 Ryosuke Niwa 2018-02-26 11:33:54 PST
Reopening to attach new patch.
Comment 7 Ryosuke Niwa 2018-02-26 11:33:55 PST
Created attachment 334631 [details]
Patch for landing
Comment 8 Ryosuke Niwa 2018-02-26 11:34:10 PST
Comment on attachment 334631 [details]
Patch for landing

Wait for EWS.
Comment 9 Chris Dumez 2018-02-26 11:34:40 PST
*** Bug 183135 has been marked as a duplicate of this bug. ***
Comment 10 Ryosuke Niwa 2018-02-26 12:37:27 PST
Comment on attachment 334568 [details]
Patch

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

>> Source/WebKit/StorageProcess/StorageProcess.cpp:191
>> +        return;
> 
> The work done here seems harmless so maybe we can do it anyway, especially since we are disabling any IPC to Messages::WebSWServerToContextConnection?
> I am not familiar with this routine but maybe there is a chance for a race condition somehow so that we initialize the website data store first and get the entitlement later on.

We need this check to disable service worker in the storage process.
Comment 11 Ryosuke Niwa 2018-02-26 12:38:38 PST
Created attachment 334634 [details]
Patch for landing
Comment 12 Ryosuke Niwa 2018-02-26 12:44:52 PST
Committed r229037: <https://trac.webkit.org/changeset/229037>