summaryrefslogtreecommitdiff
path: root/fxjse/runtime.h
diff options
context:
space:
mode:
authorweili <weili@chromium.org>2016-06-18 06:25:37 -0700
committerCommit bot <commit-bot@chromium.org>2016-06-18 06:25:37 -0700
commiteec3a366adbfada36b98f1de651546ee09df8fc0 (patch)
tree794aa8c69392b60d8737a8a5b424732b98bdd4b4 /fxjse/runtime.h
parent4ce94e118d66064715de5baebeb4b2b580dcac66 (diff)
downloadpdfium-eec3a366adbfada36b98f1de651546ee09df8fc0.tar.xz
Make code compile with clang_use_chrome_plugin (final)
This change mainly contains files in xfa/ and fxjse/ directories which were not covered by previous changes. This is part of the efforts to make PDFium code compilable by Clang chromium style plugins. After this change, PDFium can be compiled with "clang_use_chrome_plugin=true" for GN build. Since clang_use_chrome_plugin is true by default, we no longer need to set this parameter explicitly. The changes are mainly the following: -- move inline constructor/destructor of complex class/struct out-of-line; -- add constructor/destructor of complex class/struct if not explicitly defined; -- add explicit out-of-line copy constructor when needed; -- move inline virtual functions out-of-line; -- Properly mark virtual functions with 'override'; -- some minor cleanups; BUG=pdfium:469 Review-Url: https://codereview.chromium.org/2072803002
Diffstat (limited to 'fxjse/runtime.h')
-rw-r--r--fxjse/runtime.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/fxjse/runtime.h b/fxjse/runtime.h
index e3b4113a50..ff3be3a521 100644
--- a/fxjse/runtime.h
+++ b/fxjse/runtime.h
@@ -16,6 +16,8 @@ class CFXJSE_RuntimeList;
class CFXJSE_RuntimeData {
public:
+ ~CFXJSE_RuntimeData();
+
static CFXJSE_RuntimeData* Get(v8::Isolate* pIsolate);
v8::Isolate* m_pIsolate;
@@ -23,22 +25,28 @@ class CFXJSE_RuntimeData {
v8::Global<v8::Context> m_hRootContext;
protected:
+ explicit CFXJSE_RuntimeData(v8::Isolate* pIsolate);
+
static CFXJSE_RuntimeData* Create(v8::Isolate* pIsolate);
- CFXJSE_RuntimeData(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
- CFXJSE_RuntimeData();
- CFXJSE_RuntimeData(const CFXJSE_RuntimeData&);
- CFXJSE_RuntimeData& operator=(const CFXJSE_RuntimeData&);
+
+ private:
+ CFXJSE_RuntimeData(const CFXJSE_RuntimeData&) = delete;
+ CFXJSE_RuntimeData& operator=(const CFXJSE_RuntimeData&) = delete;
};
class CFXJSE_IsolateTracker {
public:
typedef void (*DisposeCallback)(v8::Isolate*, bool bOwnedIsolate);
- static CFXJSE_IsolateTracker* g_pInstance;
+
+ CFXJSE_IsolateTracker();
+ ~CFXJSE_IsolateTracker();
void Append(v8::Isolate* pIsolate);
void Remove(v8::Isolate* pIsolate, DisposeCallback lpfnDisposeCallback);
void RemoveAll(DisposeCallback lpfnDisposeCallback);
+ static CFXJSE_IsolateTracker* g_pInstance;
+
protected:
std::vector<v8::Isolate*> m_OwnedIsolates;
};