diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-16 22:17:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-16 22:17:46 +0000 |
commit | 82999fa9d685638561efc6df2c8370c7e7f47676 (patch) | |
tree | decf3cacc87bb0a0c7481d10ce7a2b1c11729a56 /fxjs/cjs_runtime.cpp | |
parent | f9d49da715deeb0efa6eaaf8ac43727ae28f8749 (diff) | |
download | pdfium-82999fa9d685638561efc6df2c8370c7e7f47676.tar.xz |
Make JSGetObject<C>() return UnownedPtr<C>.
This a convenient place to assert that the callback that is about
to be invoked on the object doesn't destroy the object at any point
during its execution.
Change-Id: Iacb9d4e01603cc6bf316b00fdd062955c903ca5c
Reviewed-on: https://pdfium-review.googlesource.com/37970
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r-- | fxjs/cjs_runtime.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index 634c48be74..9329a483f4 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -162,7 +162,7 @@ void CJS_Runtime::SetFormFillEnvToDocument() { if (pThis.IsEmpty()) return; - CJS_Document* pJSDocument = JSGetObject<CJS_Document>(pThis); + auto pJSDocument = JSGetObject<CJS_Document>(pThis); if (!pJSDocument) return; |