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

Unified Diff: fpdfsdk/cpdfsdk_interform.cpp

Issue 2624933002: Annotation deleted while retriveing it in JS (Closed)
Patch Set: rebase, another case. Created 3 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 | « fpdfsdk/cpdfsdk_interform.h ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/cpdfsdk_interform.cpp
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp
index a2f07b488fad0b96f7ca6e8035a8dde06daa389e..7b7718030b202cddee2dd99af067c657593429ba 100644
--- a/fpdfsdk/cpdfsdk_interform.cpp
+++ b/fpdfsdk/cpdfsdk_interform.cpp
@@ -117,7 +117,7 @@ CPDFSDK_Widget* CPDFSDK_InterForm::GetWidget(CPDF_FormControl* pControl) const {
void CPDFSDK_InterForm::GetWidgets(
const CFX_WideString& sFieldName,
- std::vector<CPDFSDK_Widget*>* widgets) const {
+ std::vector<CPDFSDK_Annot::ObservedPtr>* widgets) const {
for (int i = 0, sz = m_pInterForm->CountFields(sFieldName); i < sz; ++i) {
CPDF_FormField* pFormField = m_pInterForm->GetField(i, sFieldName);
ASSERT(pFormField);
@@ -127,13 +127,13 @@ void CPDFSDK_InterForm::GetWidgets(
void CPDFSDK_InterForm::GetWidgets(
CPDF_FormField* pField,
- std::vector<CPDFSDK_Widget*>* widgets) const {
+ std::vector<CPDFSDK_Annot::ObservedPtr>* widgets) const {
for (int i = 0, sz = pField->CountControls(); i < sz; ++i) {
CPDF_FormControl* pFormCtrl = pField->GetControl(i);
ASSERT(pFormCtrl);
CPDFSDK_Widget* pWidget = GetWidget(pFormCtrl);
if (pWidget)
- widgets->push_back(pWidget);
+ widgets->emplace_back(pWidget);
}
}
« no previous file with comments | « fpdfsdk/cpdfsdk_interform.h ('k') | fpdfsdk/javascript/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698