XFA: Segv in CFXJSE_RuntimeData::Get()
authorTom Sepez <tsepez@chromium.org>
Fri, 30 Oct 2015 17:28:48 +0000 (10:28 -0700)
committerTom Sepez <tsepez@chromium.org>
Fri, 30 Oct 2015 17:28:48 +0000 (10:28 -0700)
Crash occurs when JS is first entered from the FXJSE_ side,
instead of the FXJS_ side. Added initializaton call to FXJSE_.

BUG=pdfium:259
R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1406253007 .

xfa/src/fxjse/src/runtime.cpp

index 4a77b4f..0183611 100644 (file)
@@ -83,6 +83,7 @@ CFXJSE_RuntimeData* CFXJSE_RuntimeData::Create(v8::Isolate* pIsolate) {
   return pRuntimeData;\r
 }\r
 CFXJSE_RuntimeData* CFXJSE_RuntimeData::Get(v8::Isolate* pIsolate) {\r
+  FXJS_PerIsolateData::SetUp(pIsolate);\r
   FXJS_PerIsolateData* pData = FXJS_PerIsolateData::Get(pIsolate);\r
   if (!pData->m_pFXJSERuntimeData)\r
     pData->m_pFXJSERuntimeData = CFXJSE_RuntimeData::Create(pIsolate);\r