WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146102
Do not store configuration parameters twice in WebProcessPool
https://bugs.webkit.org/show_bug.cgi?id=146102
Summary
Do not store configuration parameters twice in WebProcessPool
Carlos Garcia Campos
Reported
2015-06-18 01:25:02 PDT
Since we are copying the given WebProcessPoolConfiguration and keeping it as a member, we don't need to keep an additional copy of its contents as extra members.
Attachments
Patch
(27.60 KB, patch)
2015-06-18 01:29 PDT
,
Carlos Garcia Campos
sam
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Carlos Garcia Campos
Comment 1
2015-06-18 01:29:07 PDT
Created
attachment 255100
[details]
Patch
Sam Weinig
Comment 2
2015-06-18 19:48:37 PDT
Comment on
attachment 255100
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=255100&action=review
> Source/WebKit2/UIProcess/WebProcessPool.cpp:357 > void WebProcessPool::setUsesNetworkProcess(bool usesNetworkProcess) > { > #if ENABLE(NETWORK_PROCESS) > - m_usesNetworkProcess = usesNetworkProcess; > + m_configuration->setUseNetworkProcess(usesNetworkProcess);
This is a subtle change in behavior. Before, the configuration was unchanged if someone called WebProcessPool::setUsesNetworkProcess() (via WKContextSetUsesNetworkProcess(...)), but now it will be mutated. I'm not sure if this is a big deal in practice. The same is true with WebProcessPool::setMaximumNumberOfProcesses() and WebProcessPool::setProcessModel().
Carlos Garcia Campos
Comment 3
2015-06-18 22:57:37 PDT
(In reply to
comment #2
)
> Comment on
attachment 255100
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=255100&action=review
Thanks for the review.
> > Source/WebKit2/UIProcess/WebProcessPool.cpp:357 > > void WebProcessPool::setUsesNetworkProcess(bool usesNetworkProcess) > > { > > #if ENABLE(NETWORK_PROCESS) > > - m_usesNetworkProcess = usesNetworkProcess; > > + m_configuration->setUseNetworkProcess(usesNetworkProcess); > > This is a subtle change in behavior. Before, the configuration was > unchanged if someone called WebProcessPool::setUsesNetworkProcess() (via > WKContextSetUsesNetworkProcess(...)), but now it will be mutated. I'm not > sure if this is a big deal in practice. The same is true with > WebProcessPool::setMaximumNumberOfProcesses() and > WebProcessPool::setProcessModel().
That's a good point, but there's no change in behaviour actually, because we were not using the copied configuration for those, but the members. So, you could create a WebProcessPool with usesNetworkProcess = true, a network process is ensured later, and then call WKContextSetUsesNetworkProcess(false) which set the m_usesNetworkProcess to false. WebProcessPool checked the value of m_usesNetworkProcess, so something is going to fail/crash at some point. Same would happen now with the configuration member only. We could try to prevent that in both cases, by ignoring any change in configuration after the first web process and the network process is launched.
Carlos Garcia Campos
Comment 4
2015-06-18 23:00:32 PDT
Committed
r185736
: <
http://trac.webkit.org/changeset/185736
>
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