[Webkit-unassigned] [Bug 115650] [GTK][WK2] Blocks when fetching plugins information

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 27 08:25:09 PST 2014


https://bugs.webkit.org/show_bug.cgi?id=115650





--- Comment #11 from Carlos Garcia Campos <cgarcia at igalia.com>  2014-02-27 08:22:13 PST ---
(In reply to comment #10)
> (From update of attachment 225356 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=225356&action=review
> 
> LGTM!

Thanks for the review.

> > Source/WebKit2/UIProcess/Plugins/gtk/PluginInfoCache.cpp:87
> > +    g_file_set_contents(m_cachePath.get(), data.get(), dataLength, nullptr);
> 
> I guess we don't have to be concerned about multiple webkit clients trying to write to the file at the same time since this is atomic, right?

This is only run in the main thread, because other threads "send" the task to the main thread using g_idle (the other threads that can run this use the same main context).

> > Source/WebKit2/UIProcess/Plugins/gtk/PluginInfoCache.cpp:135
> > +    // Save the cache file in an idle to make sure it happens in the main thread and
> > +    // it's done only once when this is called multiple times in a very short time.
> > +    if (m_saveToFileIdleId)
> > +        return;
> 
> I assume this is called from a single thread, so we don't need to perform any locking of the m_saveToFileIdleId member.

In this case we could probably use a mutex to be extra sure, I'll update the patch.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list