WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
201730
Pass sessionID to WebProcess with other WebProcessDataStoreParameters
https://bugs.webkit.org/show_bug.cgi?id=201730
Summary
Pass sessionID to WebProcess with other WebProcessDataStoreParameters
Chris Dumez
Reported
2019-09-12 11:42:39 PDT
Pass sessionID to WebProcess with other WebProcessDataStoreParameters and store it on the WebProcess object.
Attachments
Patch
(21.26 KB, patch)
2019-09-12 11:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Patch
(21.57 KB, patch)
2019-09-12 14:44 PDT
,
Chris Dumez
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Chris Dumez
Comment 1
2019-09-12 11:44:44 PDT
Created
attachment 378664
[details]
Patch
Alex Christensen
Comment 2
2019-09-12 14:10:09 PDT
Comment on
attachment 378664
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378664&action=review
> Source/WebKit/Shared/WebProcessCreationParameters.h:199 > + Optional<WebProcessDataStoreParameters> websiteDataStoreParameters;
Why Optional? Won't we always have a WebsiteDataStore when making a WebProcess?
> Source/WebKit/Shared/WebProcessDataStoreParameters.h:131 > + return WebProcessDataStoreParameters { WTFMove(*sessionID), WTFMove(applicationCacheDirectory), WTFMove(*applicationCacheDirectoryExtensionHandle), WTFMove(applicationCacheFlatFileSubdirectoryName), WTFMove(webSQLDatabaseDirectory), WTFMove(*webSQLDatabaseDirectoryExtensionHandle), WTFMove(mediaCacheDirectory), WTFMove(*mediaCacheDirectoryExtensionHandle), WTFMove(mediaKeyStorageDirectory), WTFMove(*mediaKeyStorageDirectoryExtensionHandle), WTFMove(javaScriptConfigurationDirectory), WTFMove(*javaScriptConfigurationDirectoryExtensionHandle), resourceLoadStatisticsEnabled };
Please put these each on their own line so we can add to them and see the version history.
> Source/WebKit/WebProcess/WebProcess.h:166 > + // Prewarmed WebProcesses do not have an associated sessionID yet, which is why this is an optional. > + // By the time the WebProcess gets a WebPage, it is guaranteed to have a sessionID.
Why don't we just prewarm processes for use with a particular website data store?
Chris Dumez
Comment 3
2019-09-12 14:16:24 PDT
Comment on
attachment 378664
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378664&action=review
>> Source/WebKit/Shared/WebProcessCreationParameters.h:199 >> + Optional<WebProcessDataStoreParameters> websiteDataStoreParameters; > > Why Optional? Won't we always have a WebsiteDataStore when making a WebProcess?
I guess you know now since you saw my comment below.
>> Source/WebKit/Shared/WebProcessDataStoreParameters.h:131 >> + return WebProcessDataStoreParameters { WTFMove(*sessionID), WTFMove(applicationCacheDirectory), WTFMove(*applicationCacheDirectoryExtensionHandle), WTFMove(applicationCacheFlatFileSubdirectoryName), WTFMove(webSQLDatabaseDirectory), WTFMove(*webSQLDatabaseDirectoryExtensionHandle), WTFMove(mediaCacheDirectory), WTFMove(*mediaCacheDirectoryExtensionHandle), WTFMove(mediaKeyStorageDirectory), WTFMove(*mediaKeyStorageDirectoryExtensionHandle), WTFMove(javaScriptConfigurationDirectory), WTFMove(*javaScriptConfigurationDirectoryExtensionHandle), resourceLoadStatisticsEnabled }; > > Please put these each on their own line so we can add to them and see the version history.
Ok.
>> Source/WebKit/WebProcess/WebProcess.h:166 >> + // By the time the WebProcess gets a WebPage, it is guaranteed to have a sessionID. > > Why don't we just prewarm processes for use with a particular website data store?
We don't know for which datastore we're going to need a process next at the time of pre-warming. We used to prewarm for the default session and then not use the pre-warmed process if the data store was not the default one but this was wasteful.
Chris Dumez
Comment 4
2019-09-12 14:44:08 PDT
Created
attachment 378680
[details]
Patch
Chris Dumez
Comment 5
2019-09-12 14:53:39 PDT
Comment on
attachment 378680
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=378680&action=review
> Source/WebKit/WebProcess/WebProcess.h:167 > + const Optional<PAL::SessionID>& sessionID() const { return m_sessionID; }
Not that the only code that runs in a pre-warmed process is the initialization function so we could easily return an SessionID here instead of an Optional<SessionID> and ASSERT(m_sessionID). Let me know if you'd prefer that.
WebKit Commit Bot
Comment 6
2019-09-12 15:46:26 PDT
Comment on
attachment 378680
[details]
Patch Clearing flags on attachment: 378680 Committed
r249818
: <
https://trac.webkit.org/changeset/249818
>
WebKit Commit Bot
Comment 7
2019-09-12 15:46:28 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 8
2019-09-12 15:47:17 PDT
<
rdar://problem/55320799
>
Radar WebKit Bug Importer
Comment 9
2019-09-12 15:47:19 PDT
<
rdar://problem/55320800
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug