summaryrefslogtreecommitdiff
path: root/xfa/src/fxjse
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-01-16 14:59:26 -0800
committerTom Sepez <tsepez@chromium.org>2015-01-16 14:59:26 -0800
commit96d1334cb605aab143d3135da4d4550920735e91 (patch)
tree0a4371ef00759ce63cbb1324ef018b0311bcf84d /xfa/src/fxjse
parenta7f7a284393dbadeb1aaa861677570b61b9658ae (diff)
downloadpdfium-96d1334cb605aab143d3135da4d4550920735e91.tar.xz
Merge to XFA: PDFium embeddertests.
This consists of two origin/master CLs: Review URL: https://codereview.chromium.org/857483005 Review URL: https://codereview.chromium.org/827733006 It also fixes a couple of segv's in XFA when the library is initialized and destroyed multiple times in the same process. R=jam@chromium.org TBR=jam@chromium.org Review URL: https://codereview.chromium.org/856623004
Diffstat (limited to 'xfa/src/fxjse')
-rw-r--r--xfa/src/fxjse/src/runtime.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/xfa/src/fxjse/src/runtime.cpp b/xfa/src/fxjse/src/runtime.cpp
index e406f6a233..0a1b0db78b 100644
--- a/xfa/src/fxjse/src/runtime.cpp
+++ b/xfa/src/fxjse/src/runtime.cpp
@@ -14,6 +14,9 @@ static void FXJSE_KillV8()
}
void FXJSE_Initialize()
{
+ if(!CFXJSE_RuntimeData::g_RuntimeList) {
+ CFXJSE_RuntimeData::g_RuntimeList = FX_NEW CFXJSE_RuntimeList;
+ }
static FX_BOOL bV8Initialized = FALSE;
if (bV8Initialized) {
return;
@@ -26,12 +29,9 @@ void FXJSE_Initialize()
;
v8::V8::SetFlagsFromString(szCmdFlags, FXSYS_strlen(szCmdFlags));
v8::V8::InitializeICU();
- v8::Platform* platform = v8::platform::CreateDefaultPlatform();
- v8::V8::InitializePlatform(platform);
+ v8::Platform* platform = v8::platform::CreateDefaultPlatform();
+ v8::V8::InitializePlatform(platform);
v8::V8::Initialize();
- if(!CFXJSE_RuntimeData::g_RuntimeList) {
- CFXJSE_RuntimeData::g_RuntimeList = FX_NEW CFXJSE_RuntimeList;
- }
}
static void FXJSE_Runtime_DisposeCallback(v8::Isolate* pIsolate)
{