[Webkit-unassigned] [Bug 196094] [GTK][WPE] Implement a basic DNS cache

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 19 10:20:45 PDT 2019


--- Comment #8 from Michael Catanzaro <mcatanzaro at igalia.com> ---
Comment on attachment 372453
  --> https://bugs.webkit.org/attachment.cgi?id=372453

View in context: https://bugs.webkit.org/attachment.cgi?id=372453&action=review

I have a question about the threadsafety semantics. I was originally going to ask why you are using a lock in the DNSCache implementation, since I would have expected that would only ever be called from the main thread. But I see that is wrong, because GResolver is a global singleton, and global singletons in GLib are (probably) expected to be threadsafe (even though I've never seen any documentation indicate this clearly). OK then, the DNSCache is used by your WebKitCachedResolver, so makes sense for DNSCache to be threadsafe.

But WebKitCachedResolver is not itself threadsafe. So that doesn't make sense to me.

I have a suspicion that these will both only ever be used by WebKit on its main thread, so the DNSCache lock could be removed...? Is that not correct? If it's not correct, then I think WebKitCachedResolver needs its own lock. It just seems really suspicious that one has a lock but not the other.

> Source/WebKit/NetworkProcess/glib/WebKitCachedResolver.cpp:74

Huh, I didn't know we had this.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190619/0a894c06/attachment-0001.html>

More information about the webkit-unassigned mailing list