summaryrefslogtreecommitdiffstats
path: root/content/common/font_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'content/common/font_list.h')
-rw-r--r--content/common/font_list.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/content/common/font_list.h b/content/common/font_list.h
index 4f59e6d..dd14ce7 100644
--- a/content/common/font_list.h
+++ b/content/common/font_list.h
@@ -13,6 +13,11 @@ class ListValue;
namespace content {
+// Getting the list of fonts on the system is non-threadsafe on Linux for
+// versions of Pango predating 2013. This sequence token can be used to enforce
+// serial execution of get font list tasks.
+extern const char kFontListSequenceToken[];
+
// Retrieves the fonts available on the current platform and returns them.
// The caller will own the returned pointer. Each entry will be a list of
// two strings, the first being the font family, and the second being the
@@ -21,6 +26,9 @@ namespace content {
// This function is potentially slow (the system may do a bunch of I/O) so be
// sure not to call this on a time-critical thread like the UI or I/O threads.
//
+// Since getting the fonts is not threadsafe on Linux, use
+// |kFontListSequenceToken| to prevent race conditions.
+//
// Most callers will want to use the GetFontListAsync function in
// content/browser/font_list_async.h which does an asynchronous call.
scoped_ptr<base::ListValue> GetFontList_SlowBlocking();