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

Unified Diff: fpdfsdk/formfiller/cffl_formfiller.h

Issue 2266943002: Destroy window before cleaning up combobox (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Update textfield Created 4 years, 4 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 | « fpdfsdk/formfiller/cffl_combobox.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/formfiller/cffl_formfiller.h
diff --git a/fpdfsdk/formfiller/cffl_formfiller.h b/fpdfsdk/formfiller/cffl_formfiller.h
index b1e323185b5d9f6ac88ddd8d94a652fcfcef29b3..060eb8f9e751d19336215493dc8cf324b2013a0a 100644
--- a/fpdfsdk/formfiller/cffl_formfiller.h
+++ b/fpdfsdk/formfiller/cffl_formfiller.h
@@ -154,6 +154,14 @@ class CFFL_FormFiller : public IPWL_Provider, public CPWL_TimerHandler {
protected:
using CFFL_PageView2PDFWindow = std::map<CPDFSDK_PageView*, CPWL_Wnd*>;
+ // If the inheriting widget has its own fontmap and a PWL_Edit widget that
+ // access that fontmap then you have to call DestroyWindows before destroying
+ // the font map in order to not get a use-after-free.
+ //
+ // The font map should be stored somewhere more appropriate so it will live
+ // until the PWL_Edit is done with it. pdfium:566
+ void DestroyWindows();
+
CPDFDoc_Environment* m_pApp;
CPDFSDK_Widget* m_pWidget;
CPDFSDK_Annot* m_pAnnot;
« no previous file with comments | « fpdfsdk/formfiller/cffl_combobox.cpp ('k') | fpdfsdk/formfiller/cffl_formfiller.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698