Add big scary comment about thread unsafety to fpdfview.h. Surprisingly, we do not mention this in any of the public headers. Change-Id: I79c38a068b4ed592ddd362349eb2959829b86003 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/108012 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Auto-Submit: Tom Sepez <tsepez@chromium.org>
diff --git a/public/fpdfview.h b/public/fpdfview.h index 206bfe2..77196dc 100644 --- a/public/fpdfview.h +++ b/public/fpdfview.h
@@ -4,6 +4,14 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com +// This is the main header file for embedders of PDFium. It provides APIs to +// initialize the library, load documents, and render pages, amongst other +// things. +// +// NOTE: None of the PDFium APIs are thread-safe. They expect to be called +// from a single thread. Barring that, embedders are required to ensure (via +// a mutex or similar) that only a single PDFium call can be made at a time. +// // NOTE: External docs refer to this file as "fpdfview.h", so do not rename // despite lack of consistency with other public files.