Remove redundant checks in CPDF_Dictionary::SetNewFor().

SetNewFor() just calls SetFor(), and SetFor() has the same check.

Change-Id: I7f72e95875f8e3ad6466ea06f611dab7bfcb3028
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/82810
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/core/fpdfapi/parser/cpdf_dictionary.h b/core/fpdfapi/parser/cpdf_dictionary.h
index cc23730..715112b 100644
--- a/core/fpdfapi/parser/cpdf_dictionary.h
+++ b/core/fpdfapi/parser/cpdf_dictionary.h
@@ -85,7 +85,6 @@
   typename std::enable_if<!CanInternStrings<T>::value, T*>::type SetNewFor(
       const ByteString& key,
       Args&&... args) {
-    CHECK(!IsLocked());
     return static_cast<T*>(
         SetFor(key, pdfium::MakeRetain<T>(std::forward<Args>(args)...)));
   }
@@ -93,7 +92,6 @@
   typename std::enable_if<CanInternStrings<T>::value, T*>::type SetNewFor(
       const ByteString& key,
       Args&&... args) {
-    CHECK(!IsLocked());
     return static_cast<T*>(SetFor(
         key, pdfium::MakeRetain<T>(m_pPool, std::forward<Args>(args)...)));
   }