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

Unified Diff: xfa/fxfa/fm2js/xfa_expression.h

Issue 2528543003: More unique_ptrs in CXFA_FMParse::ParseForeachExpression and avoid leaks (Closed)
Patch Set: Not so much unique_ptr Created 4 years, 1 month 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 | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | xfa/fxfa/fm2js/xfa_expression.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_expression.h
diff --git a/xfa/fxfa/fm2js/xfa_expression.h b/xfa/fxfa/fm2js/xfa_expression.h
index 69337350bf28955f2ff5a134c878ab3bb9101c8e..236b51a6b00d9b80907f395f8c6222d52f85a560 100644
--- a/xfa/fxfa/fm2js/xfa_expression.h
+++ b/xfa/fxfa/fm2js/xfa_expression.h
@@ -8,6 +8,7 @@
#define XFA_FXFA_FM2JS_XFA_EXPRESSION_H_
#include <memory>
+#include <vector>
#include "xfa/fxfa/fm2js/xfa_simpleexpression.h"
@@ -197,7 +198,7 @@ class CXFA_FMForeachExpression : public CXFA_FMLoopExpression {
CXFA_FMForeachExpression(
uint32_t line,
const CFX_WideStringC& wsIdentifier,
- CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* pAccessors,
+ std::vector<std::unique_ptr<CXFA_FMSimpleExpression>>&& pAccessors,
CXFA_FMExpression* pList);
~CXFA_FMForeachExpression() override;
@@ -206,7 +207,7 @@ class CXFA_FMForeachExpression : public CXFA_FMLoopExpression {
private:
CFX_WideStringC m_wsIdentifier;
- CFX_ArrayTemplate<CXFA_FMSimpleExpression*>* m_pAccessors;
+ std::vector<std::unique_ptr<CXFA_FMSimpleExpression>> m_pAccessors;
std::unique_ptr<CXFA_FMExpression> m_pList;
};
« no previous file with comments | « no previous file | xfa/fxfa/fm2js/xfa_expression.cpp » ('j') | xfa/fxfa/fm2js/xfa_expression.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698