From b165ffb64e59998ec6d5f76c82bd2fe53734b3cd Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 11 Jul 2018 17:23:53 +0000 Subject: Use JSGetObject() in more places. Change-Id: I7f26709bdad56cc2712f21e8e644be7c53ec5ec4 Reviewed-on: https://pdfium-review.googlesource.com/37513 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- fxjs/cjs_runtime.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fxjs/cjs_runtime.cpp') diff --git a/fxjs/cjs_runtime.cpp b/fxjs/cjs_runtime.cpp index f867e31340..96253c08bf 100644 --- a/fxjs/cjs_runtime.cpp +++ b/fxjs/cjs_runtime.cpp @@ -161,12 +161,10 @@ void CJS_Runtime::SetFormFillEnvToDocument() { v8::Context::Scope context_scope(context); v8::Local pThis = GetThisObj(); - if (pThis.IsEmpty() || - CFXJS_Engine::GetObjDefnID(pThis) != CJS_Document::GetObjDefnID()) { + if (pThis.IsEmpty()) return; - } - auto* pJSDocument = - static_cast(CFXJS_Engine::GetObjectPrivate(pThis)); + + CJS_Document* pJSDocument = JSGetObject(pThis); if (!pJSDocument) return; -- cgit v1.2.3