Bug 160658
Summary: | [GTK] webkit_web_context_set_tls_errors_policy fails when called before network process is created | ||
---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> |
Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED INVALID | ||
Severity: | Minor | CC: | bugs-noreply, mcatanzaro, musl100-bes |
Priority: | P2 | ||
Version: | Other | ||
Hardware: | PC | ||
OS: | Linux |
Michael Catanzaro
In webkitWebContextConstructed we have this code:
priv->processPool = WebProcessPool::create(configuration);
// ...
priv->tlsErrorsPolicy = WEBKIT_TLS_ERRORS_POLICY_FAIL;
priv->processPool->setIgnoreTLSErrors(false);
The call to WebProcessPool::setIgnoreTLSErrors always fails, because it only sends the message if the network process has already been created, but at this point it has not been created yet.
I think it's not really needed here, because false is the default, so not a big deal. But it becomes a real problem if an API user ever does something like this:
context = webkit_web_context_new();
webkit_web_context_set_tls_errors_policy (context, WEBKIT_TLS_ERRORS_POLICY_IGNORE);
This fails too, the policy gets changed in the UI process, but the network process never sees it. I don't think these messages should ever be dropped.
As suggested by Nick White in bug #128674, an appropriate fix might be for WebProcessPool::setIgnoreTLSErrors to call ensureNetworkProcess().
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
Not a bug, because we save the state in WebProcessPool::m_ignoreTLSErrors and send it along with NetworkProcessCreationParameters.
Michael Catanzaro
Note this bug report was based on mistaken code inspection:
(In reply to comment #1)
> Not a bug, because we save the state in WebProcessPool::m_ignoreTLSErrors
> and send it along with NetworkProcessCreationParameters.