summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Runtime.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-09-10 12:28:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-09-10 12:28:37 -0700
commit808a99e8c6f72713ca9492508faa4b8445ae0d33 (patch)
treeb171af528eac6ff284bcb257418f49c031f640cd /fpdfsdk/include/javascript/JS_Runtime.h
parentab54bc0f66ca3130ea4780580060f75f20c12234 (diff)
downloadpdfium-808a99e8c6f72713ca9492508faa4b8445ae0d33.tar.xz
Merge to XFA: Remove some abstractions in fxjs_v8.h.
Conflicts: fpdfsdk/src/javascript/Document.cpp fpdfsdk/src/javascript/JS_Runtime.cpp fpdfsdk/src/jsapi/fxjs_v8.cpp New: fpdfsdk/src/fpdfxfa/fpdfxfa_app.cpp (cherry picked from commit 6df59849472958e7de96da6d9fc7b223b7c1f1c3) Original Review URL: https://codereview.chromium.org/1332973002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1334833003 .
Diffstat (limited to 'fpdfsdk/include/javascript/JS_Runtime.h')
-rw-r--r--fpdfsdk/include/javascript/JS_Runtime.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/fpdfsdk/include/javascript/JS_Runtime.h b/fpdfsdk/include/javascript/JS_Runtime.h
index d512484230..683021b003 100644
--- a/fpdfsdk/include/javascript/JS_Runtime.h
+++ b/fpdfsdk/include/javascript/JS_Runtime.h
@@ -40,7 +40,7 @@ class CJS_Runtime : public IFXJS_Runtime {
void SetReaderDocument(CPDFSDK_Document* pReaderDoc) override;
CPDFSDK_Document* GetReaderDocument() override { return m_pDocument; }
- CPDFDoc_Environment* GetReaderApp() { return m_pApp; }
+ CPDFDoc_Environment* GetReaderApp() const { return m_pApp; }
FX_BOOL InitJSObjects();
@@ -52,12 +52,9 @@ class CJS_Runtime : public IFXJS_Runtime {
void BeginBlock() { m_bBlocking = TRUE; }
void EndBlock() { m_bBlocking = FALSE; }
- FX_BOOL IsBlocking() { return m_bBlocking; }
-
- operator IJS_Runtime*() { return (IJS_Runtime*)m_isolate; }
- v8::Isolate* GetIsolate() { return m_isolate; }
- void SetIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
+ FX_BOOL IsBlocking() const { return m_bBlocking; }
+ v8::Isolate* GetIsolate() const { return m_isolate; }
v8::Local<v8::Context> NewJSContext();
virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name,
@@ -71,7 +68,6 @@ class CJS_Runtime : public IFXJS_Runtime {
CPDFSDK_Document* m_pDocument;
FX_BOOL m_bBlocking;
CJS_FieldEvent* m_pFieldEventPath;
-
v8::Isolate* m_isolate;
bool m_isolateManaged;
nonstd::unique_ptr<CJS_ArrayBufferAllocator> m_pArrayBufferAllocator;