diff options
Diffstat (limited to 'fpdfsdk/src/javascript/JS_Runtime.cpp')
-rw-r--r-- | fpdfsdk/src/javascript/JS_Runtime.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fpdfsdk/src/javascript/JS_Runtime.cpp b/fpdfsdk/src/javascript/JS_Runtime.cpp index b26f5a2e62..f21819ac17 100644 --- a/fpdfsdk/src/javascript/JS_Runtime.cpp +++ b/fpdfsdk/src/javascript/JS_Runtime.cpp @@ -35,7 +35,11 @@ IFXJS_Runtime* CJS_RuntimeFactory::NewJSRuntime(CPDFDoc_Environment* pApp) { if (!m_bInit) { - JS_Initial(); + unsigned int embedderDataSlot = 0; + if (pApp->GetFormFillInfo()->m_pJsPlatform->version >= 2) { + embedderDataSlot = pApp->GetFormFillInfo()->m_pJsPlatform->m_v8EmbedderSlot; + } + JS_Initial(embedderDataSlot); m_bInit = TRUE; } return new CJS_Runtime(pApp); |