summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Runtime.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-15 15:30:34 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-15 15:30:34 -0700
commit7d0fcbf8198f04a5a5bd15482fdbdae919fb1891 (patch)
tree61817fe7a1fa74c00a7610e8537df62f13e0d8f8 /fpdfsdk/include/javascript/JS_Runtime.h
parent5eb8ba2ef43bac9c8fb96f75357b21b0dbeefe80 (diff)
downloadpdfium-7d0fcbf8198f04a5a5bd15482fdbdae919fb1891.tar.xz
Merge to XFA: Refactor fxjs_v8 and add embeddertests for it.
(cherry picked from commit b17d62601b21dfce85718e08cfd0ffce3a45d74e) (cherry picked from commit 09ed30750282bf56a92d0e646ab22c64bea81a36) Manual edits: fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp - add lockers. fppdfsdk/src/javascript/JS_Runtime.cpp - rework XFA init path. Original Review URL: https://codereview.chromium.org/1338073002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1348433002 .
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Runtime.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index ac1a688369..f0285b271c 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -15,12 +15,6 @@
class CJS_Context;
-class CJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
- void* Allocate(size_t length) override;
- void* AllocateUninitialized(size_t length) override;
- void Free(void* data, size_t length) override;
-};
-
class CJS_FieldEvent {
public:
CFX_WideString sTargetName;
@@ -30,7 +24,7 @@ class CJS_FieldEvent {
class CJS_Runtime : public IFXJS_Runtime {
public:
- CJS_Runtime(CPDFDoc_Environment* pApp);
+ explicit CJS_Runtime(CPDFDoc_Environment* pApp);
~CJS_Runtime() override;
// IFXJS_Runtime
@@ -70,7 +64,7 @@ class CJS_Runtime : public IFXJS_Runtime {
CJS_FieldEvent* m_pFieldEventPath;
v8::Isolate* m_isolate;
bool m_isolateManaged;
- nonstd::unique_ptr<CJS_ArrayBufferAllocator> m_pArrayBufferAllocator;
+ nonstd::unique_ptr<JS_ArrayBufferAllocator> m_pArrayBufferAllocator;
v8::Global<v8::Context> m_context;
};