summaryrefslogtreecommitdiff
path: root/fxjs/ijs_runtime.h
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/ijs_runtime.h')
-rw-r--r--fxjs/ijs_runtime.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/fxjs/ijs_runtime.h b/fxjs/ijs_runtime.h
index b97c65ef90..cde31c6e52 100644
--- a/fxjs/ijs_runtime.h
+++ b/fxjs/ijs_runtime.h
@@ -16,18 +16,22 @@
#include "fxjs/fxjse.h"
#endif // PDF_ENABLE_XFA
+class CJS_Runtime;
class CPDFSDK_FormFillEnvironment;
class IJS_EventContext;
-// Owns the FJXS objects needed to actually execute JS.
+// Owns the FJXS objects needed to actually execute JS, if possible. This
+// virtual interface is backed by either an actual JS runtime, or a stub,
+// when JS is not present.
class IJS_Runtime {
public:
static void Initialize(unsigned int slot, void* isolate);
static void Destroy();
static std::unique_ptr<IJS_Runtime> Create(
CPDFSDK_FormFillEnvironment* pFormFillEnv);
- virtual ~IJS_Runtime() {}
+ virtual ~IJS_Runtime();
+ virtual CJS_Runtime* AsCJSRuntime() = 0;
virtual IJS_EventContext* NewEventContext() = 0;
virtual void ReleaseEventContext(IJS_EventContext* pContext) = 0;
virtual CPDFSDK_FormFillEnvironment* GetFormFillEnv() const = 0;