summaryrefslogtreecommitdiff
path: root/fxjs/ijs_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/ijs_runtime.cpp')
-rw-r--r--fxjs/ijs_runtime.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/fxjs/ijs_runtime.cpp b/fxjs/ijs_runtime.cpp
index afbdaefca4..50abd39c8b 100644
--- a/fxjs/ijs_runtime.cpp
+++ b/fxjs/ijs_runtime.cpp
@@ -13,6 +13,13 @@
#include "fxjs/cjs_runtime.h"
#endif
+IJS_Runtime::ScopedEventContext::ScopedEventContext(IJS_Runtime* pRuntime)
+ : m_pRuntime(pRuntime), m_pContext(pRuntime->NewEventContext()) {}
+
+IJS_Runtime::ScopedEventContext::~ScopedEventContext() {
+ m_pRuntime->ReleaseEventContext(m_pContext.Release());
+}
+
// static
void IJS_Runtime::Initialize(unsigned int slot, void* isolate) {
#ifdef PDF_ENABLE_V8