diff options
author | Lei Zhang <thestig@chromium.org> | 2018-07-11 17:23:53 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-11 17:23:53 +0000 |
commit | b165ffb64e59998ec6d5f76c82bd2fe53734b3cd (patch) | |
tree | 2d1de5e7dc0fc4b6a4e1fbaa8437e57f9acfd4e8 /fxjs/cjs_runtime.cpp | |
parent | 7c694a4632dc3b11e26d66a44e598a211913d02a (diff) | |
download | pdfium-b165ffb64e59998ec6d5f76c82bd2fe53734b3cd.tar.xz |
Use JSGetObject() in more places.chromium/3489
Change-Id: I7f26709bdad56cc2712f21e8e644be7c53ec5ec4
Reviewed-on: https://pdfium-review.googlesource.com/37513
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r-- | fxjs/cjs_runtime.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
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<v8::Object> pThis = GetThisObj(); - if (pThis.IsEmpty() || - CFXJS_Engine::GetObjDefnID(pThis) != CJS_Document::GetObjDefnID()) { + if (pThis.IsEmpty()) return; - } - auto* pJSDocument = - static_cast<CJS_Document*>(CFXJS_Engine::GetObjectPrivate(pThis)); + + CJS_Document* pJSDocument = JSGetObject<CJS_Document>(pThis); if (!pJSDocument) return; |