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

Unified Diff: fxjs/include/fxjs_v8.h

Issue 2354923003: Fix leaks related to the usage of JSE runtime data (Closed)
Patch Set: Created 4 years, 3 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 | « fxjs/fxjs_v8.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fxjs/include/fxjs_v8.h
diff --git a/fxjs/include/fxjs_v8.h b/fxjs/include/fxjs_v8.h
index 7c4a9070f82c0e46f50375f58429bd253546ca52..c08cc8b7ad28f996f5ea81a97810b20d96cff3f8 100644
--- a/fxjs/include/fxjs_v8.h
+++ b/fxjs/include/fxjs_v8.h
@@ -18,9 +18,15 @@
#include <v8.h>
#include <map>
+#include <memory>
#include <vector>
#include "core/fxcrt/include/fx_string.h"
+#ifdef PDF_ENABLE_XFA
+// Header for CFXJSE_RuntimeData. FXJS_V8 doesn't interpret this class,
+// it is just passed along to XFA.
+#include "fxjs/cfxjse_runtimedata.h"
+#endif // PDF_ENABLE_XFA
class CFXJS_Engine;
class CFXJS_ObjDefinition;
@@ -29,12 +35,6 @@ class CFXJS_ObjDefinition;
// on to caller-provided methods.
class IJS_Context; // A description of the event that caused JS execution.
-#ifdef PDF_ENABLE_XFA
-// FXJS_V8 places no interpreation on this calass; it merely passes it
-// along to XFA.
-class CFXJSE_RuntimeData;
-#endif // PDF_ENABLE_XFA
-
enum FXJSOBJTYPE {
FXJSOBJTYPE_DYNAMIC = 0, // Created by native method and returned to JS.
FXJSOBJTYPE_STATIC, // Created by init and hung off of global object.
@@ -111,7 +111,7 @@ class FXJS_PerIsolateData {
std::vector<CFXJS_ObjDefinition*> m_ObjectDefnArray;
#ifdef PDF_ENABLE_XFA
- CFXJSE_RuntimeData* m_pFXJSERuntimeData;
+ std::unique_ptr<CFXJSE_RuntimeData> m_pFXJSERuntimeData;
#endif // PDF_ENABLE_XFA
V8TemplateMap* m_pDynamicObjsMap;
« no previous file with comments | « fxjs/fxjs_v8.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698