diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-22 17:40:12 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-22 17:40:12 +0000 |
commit | 0928bc5aba36e47ef5c330cb1157d351bd1e72ab (patch) | |
tree | 365273e3abda49dc825109983b75147c26f99c43 /fxjs/ijs_runtime.cpp | |
parent | dc7e7fa32798770243289827c9db2607061fb2a7 (diff) | |
download | pdfium-0928bc5aba36e47ef5c330cb1157d351bd1e72ab.tar.xz |
Use UnownedPtr<> in IJS_Runtime.
Change-Id: I9f5f3c54144163b5ac188e38fcb8d8fa93d4bd7a
Reviewed-on: https://pdfium-review.googlesource.com/40951
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxjs/ijs_runtime.cpp')
-rw-r--r-- | fxjs/ijs_runtime.cpp | 7 |
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 |