summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/javascript
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/src/javascript')
-rw-r--r--fpdfsdk/src/javascript/JS_Runtime.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp
index f97b454993..a449a142ac 100644
--- a/fpdfsdk/src/javascript/JS_Runtime.cpp
+++ b/fpdfsdk/src/javascript/JS_Runtime.cpp
@@ -70,7 +70,9 @@ CJS_Runtime::CJS_Runtime(CPDFDoc_Environment* pApp)
return;
}
- DefineJSObjects();
+ if (m_isolateManaged || FXJS_GlobalIsolateRefCount() == 0)
+ DefineJSObjects();
+
CPDFXFA_App::GetInstance()->SetJavaScriptInitialized(TRUE);
CJS_Context* pContext = (CJS_Context*)NewContext();