<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] webkit_web_context_set_tls_errors_policy fails when called before network process is created"
href="https://bugs.webkit.org/show_bug.cgi?id=160658">160658</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[GTK] webkit_web_context_set_tls_errors_policy fails when called before network process is created
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Other
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Minor
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>WebKit Gtk
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mcatanzaro@igalia.com
</td>
</tr>
<tr>
<th>CC</th>
<td>bugs-noreply@webkitgtk.org
</td>
</tr></table>
<p>
<div>
<pre>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 <a class="bz_bug_link
bz_status_NEW "
title="NEW - [GTK] Provide API to set proxy settings"
href="show_bug.cgi?id=128674">bug #128674</a>, an appropriate fix might be for WebProcessPool::setIgnoreTLSErrors to call ensureNetworkProcess().</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>