From 57e097750846bf3ffc3e4e2ef9e78be8a82c69de Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 5 Feb 2018 18:52:09 +0000 Subject: Use unique pointer in CFXJS_PerObjectData. Also use the actual type information, not void* and remove casts. Template function not required to wrap virtual dtors. Change-Id: I9397cae136c3c395a368a1ef0ce8162d9b586076 Reviewed-on: https://pdfium-review.googlesource.com/25290 Reviewed-by: dsinclair Commit-Queue: Tom Sepez --- fxjs/cjs_app.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fxjs/cjs_app.cpp') diff --git a/fxjs/cjs_app.cpp b/fxjs/cjs_app.cpp index 32cac22153..7d16cbaaa2 100644 --- a/fxjs/cjs_app.cpp +++ b/fxjs/cjs_app.cpp @@ -77,9 +77,8 @@ int CJS_App::ObjDefnID = -1; // static void CJS_App::DefineJSObjects(CFXJS_Engine* pEngine) { - ObjDefnID = - pEngine->DefineObj("app", FXJSOBJTYPE_STATIC, JSConstructor, - JSDestructor); + ObjDefnID = pEngine->DefineObj("app", FXJSOBJTYPE_STATIC, + JSConstructor, JSDestructor); DefineProps(pEngine, ObjDefnID, PropertySpecs, FX_ArraySize(PropertySpecs)); DefineMethods(pEngine, ObjDefnID, MethodSpecs, FX_ArraySize(MethodSpecs)); } @@ -376,8 +375,7 @@ void app::ClearTimerCommon(CJS_Runtime* pRuntime, v8::Local param) { if (CFXJS_Engine::GetObjDefnID(pObj) != CJS_TimerObj::GetObjDefnID()) return; - CJS_Object* pJSObj = - static_cast(pRuntime->GetObjectPrivate(pObj)); + CJS_Object* pJSObj = pRuntime->GetObjectPrivate(pObj); if (!pJSObj) return; -- cgit v1.2.3