Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1717)

Unified Diff: core/include/fpdfapi/fpdf_objects.h

Issue 1582963003: Fix some iterator invalidation issues while traversing CPDF_Dictionary. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase, use Lei's fix Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/include/fpdfapi/fpdf_objects.h
diff --git a/core/include/fpdfapi/fpdf_objects.h b/core/include/fpdfapi/fpdf_objects.h
index 80d978ecd9ea7af17de958d0684cdb40aedc7a84..92ce0b922f86ef54596f5add0480e53e4ab8b846 100644
--- a/core/include/fpdfapi/fpdf_objects.h
+++ b/core/include/fpdfapi/fpdf_objects.h
@@ -385,6 +385,7 @@ class CPDF_Dictionary : public CPDF_Object {
FX_BOOL KeyExist(const CFX_ByteStringC& key) const;
+ // Set* functions invalidate iterators for the element with the key |key|.
void SetAt(const CFX_ByteStringC& key, CPDF_Object* pObj);
void SetAtName(const CFX_ByteStringC& key, const CFX_ByteString& name);
@@ -415,8 +416,10 @@ class CPDF_Dictionary : public CPDF_Object {
void SetAtBoolean(const CFX_ByteStringC& key, FX_BOOL bValue);
+ // Invalidates iterators for the element with the key |key|.
void RemoveAt(const CFX_ByteStringC& key);
+ // Invalidates iterators for the element with the key |oldkey|.
void ReplaceKey(const CFX_ByteStringC& oldkey, const CFX_ByteStringC& newkey);
FX_BOOL Identical(CPDF_Dictionary* pDict) const;
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_parser/fpdf_parser_objects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698