<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Notify client immediately if network session doesn't exist for a synchronous XHR load."
href="https://bugs.webkit.org/show_bug.cgi?id=158239">bug 158239</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #280269 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Notify client immediately if network session doesn't exist for a synchronous XHR load."
href="https://bugs.webkit.org/show_bug.cgi?id=158239#c12">Comment # 12</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Notify client immediately if network session doesn't exist for a synchronous XHR load."
href="https://bugs.webkit.org/show_bug.cgi?id=158239">bug 158239</a>
from <span class="vcard"><a class="email" href="mailto:beidson@apple.com" title="Brady Eidson <beidson@apple.com>"> <span class="fn">Brady Eidson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=280269&action=diff" name="attach_280269" title="V3: notify the client asynchronously.">attachment 280269</a> <a href="attachment.cgi?id=280269&action=edit" title="V3: notify the client asynchronously.">[details]</a></span>
V3: notify the client asynchronously.
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=280269&action=review">https://bugs.webkit.org/attachment.cgi?id=280269&action=review</a>
<span class="quote">> Source/WebKit2/NetworkProcess/NetworkLoad.cpp:64
> + RunLoop::main().dispatch([this, url = parameters.request.url()] {
> + didCompleteWithError(internalError(url));
> + });</span >
This is a super nit pick, and the first time I've ever suggested it...
But we've been looking at all of our lambda usage lately, and going over things like "RunLoop::dispatch" and "callOnMainThread" with a fine toothed comb. We've found a number of thread safety issues.
At a glance, this looks like a potential thread safety issue, because it's unsafe to send a URL across threads without making an isolatedCopy() of it first.
Of course this isn't *actually* a thread safety issue because it's not cross thread - RunLoop::main() happens to also be the current RunLoop.
If the dispatch was instead "RunLoop::current().dispatch(...)", then I wouldn't even have considered it a potential thread safety issue.
If you'd like to make that change, that'd be nice. I haven't thought about it a lot yet, but I think that's what we should do going forward and will likely be discussing with a larger audience soon.
r+ either way.</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>