summaryrefslogtreecommitdiff
path: root/fxjs/cjs_runtime.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fxjs/cjs_runtime.cpp')
-rw-r--r--fxjs/cjs_runtime.cpp8
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;