From 692746685bc1cd1f6c161d29567f3167853f07a5 Mon Sep 17 00:00:00 2001 From: David Klein Date: Thu, 1 Feb 2024 14:00:52 +0100 Subject: [PATCH] Added Thread Safety Analysis Exceptions --- dom/xhr/XMLHttpRequestString.cpp | 2 +- parser/html/nsHtml5StreamParser.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dom/xhr/XMLHttpRequestString.cpp b/dom/xhr/XMLHttpRequestString.cpp index 8d13ce1e08088..0eba42fe9f1c9 100644 --- a/dom/xhr/XMLHttpRequestString.cpp +++ b/dom/xhr/XMLHttpRequestString.cpp @@ -44,7 +44,7 @@ class XMLHttpRequestStringBuffer final { mData.Append(aString); } - void UnsafeAppendTaintAt(size_t aIndex, const StringTaint& aTaint) + void UnsafeAppendTaintAt(size_t aIndex, const StringTaint& aTaint) MOZ_NO_THREAD_SAFETY_ANALYSIS { // Caller must hold the lock mData.Taint().concat(aTaint, aIndex); diff --git a/parser/html/nsHtml5StreamParser.cpp b/parser/html/nsHtml5StreamParser.cpp index d575b55d27393..a7bebd9b33ab0 100644 --- a/parser/html/nsHtml5StreamParser.cpp +++ b/parser/html/nsHtml5StreamParser.cpp @@ -1727,8 +1727,9 @@ nsresult nsHtml5StreamParser::CopySegmentsToParserNoTaint( /* static */ nsresult nsHtml5StreamParser::CopySegmentsToParser( - nsITaintawareInputStream *aInStream, void *aClosure, const char *aFromSegment, - uint32_t aToOffset, uint32_t aCount, const StringTaint& aTaint, uint32_t *aWriteCount) { + nsITaintawareInputStream *aInStream, void *aClosure, const char *aFromSegment, + uint32_t aToOffset, uint32_t aCount, const StringTaint& aTaint, + uint32_t *aWriteCount) MOZ_NO_THREAD_SAFETY_ANALYSIS { nsHtml5StreamParser* parser = static_cast(aClosure); parser->DoDataAvailable(AsBytes(Span(aFromSegment, aCount)), aTaint);