summaryrefslogtreecommitdiff
path: root/fxjs/cjs_app.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-16 22:17:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-16 22:17:46 +0000
commit82999fa9d685638561efc6df2c8370c7e7f47676 (patch)
treedecf3cacc87bb0a0c7481d10ce7a2b1c11729a56 /fxjs/cjs_app.cpp
parentf9d49da715deeb0efa6eaaf8ac43727ae28f8749 (diff)
downloadpdfium-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_app.cpp')
-rw-r--r--fxjs/cjs_app.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp
index fd98670c51..485184bfc4 100644
--- a/fxjs/cjs_app.cpp
+++ b/fxjs/cjs_app.cpp
@@ -103,7 +103,7 @@ CJS_App::~CJS_App() = default;
CJS_Return CJS_App::get_active_docs(CJS_Runtime* pRuntime) {
v8::Local<v8::Object> pObj = pRuntime->GetThisObj();
- CJS_Document* pJSDocument = JSGetObject<CJS_Document>(pObj);
+ auto pJSDocument = JSGetObject<CJS_Document>(pObj);
v8::Local<v8::Array> aDocs = pRuntime->NewArray();
pRuntime->PutArrayElement(
aDocs, 0,
@@ -394,7 +394,7 @@ void CJS_App::ClearTimerCommon(CJS_Runtime* pRuntime,
return;
v8::Local<v8::Object> pObj = pRuntime->ToObject(param);
- CJS_TimerObj* pTimer = JSGetObject<CJS_TimerObj>(pObj);
+ auto pTimer = JSGetObject<CJS_TimerObj>(pObj);
if (!pTimer)
return;