It turns out that we have code constructing and using SecurityOrigin objects from non-main threads. This is currently unsafe, mostly because of SecurityOrigin's reliance on the SchemeRegistry. Note that it will be safe to: - Construct a SecurityOrigin from any thread A and use that origin later on same thread A It will not be safe to: - Pass a SecurityOrigin to another thread without calling isolatedCopy().
Created attachment 336950 [details] Patch
Created attachment 336951 [details] Patch
Comment on attachment 336951 [details] Patch I wonder whether we should not be making more SchemeRegistry thread safe. All the methods only used by Document/DocumentLoader seem fine to me. I am less sure of the Database one but probably it is and will remain safe? Out of pure curiosity, it seems that we are really locking for write but maybe we could allow multiple read in parallel? Especially since we barely touch Schemes. View in context: https://bugs.webkit.org/attachment.cgi?id=336951&action=review > Source/WebCore/platform/SchemeRegistry.cpp:497 > { Ideally these registerXX should take a String&& since most of the time, they are called from IPC that can provide String&&
Comment on attachment 336951 [details] Patch Clearing flags on attachment: 336951 Committed r230205: <https://trac.webkit.org/changeset/230205>
All reviewed patches have been landed. Closing bug.
<rdar://problem/39143063>