diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-02 16:43:15 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-02 16:43:15 -0700 |
commit | 3dedace9623fef6161a8666e53a4ab2b9be61e4c (patch) | |
tree | 78fba57e1a3edcd064dead99da9a01e8a56055eb /fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp | |
parent | ac67d4765a8ac36cd00c9fc8b6f2b80a3e1cff72 (diff) | |
download | pdfium-3dedace9623fef6161a8666e53a4ab2b9be61e4c.tar.xz |
Pass v8::Isolate to PDFium at init time.
Move the external isolate and embedder slot from the
IPDF_JSPlatforms struct supplied at the
FPDFDOC_InitFormFillEnvironment() call time to arguments to
the FPDF_InitLibraryWithConfig() call.
This has several benefits:
-- Avoids the crash that could happen if multiple
FPDFDOC_InitFormFillEnvironmen() calls should happen to be
made by an embedder with different slot values.
-- Down the road, for XFA, there may be XFA but no FormFill
environment.
We support both forms for the time being, until the chrome
side catches up, at which point we will deprecate the old
way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1367033002 .
Diffstat (limited to 'fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp')
-rw-r--r-- | fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp index 7726c40c5e..1c660397d1 100644 --- a/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp +++ b/fpdfsdk/src/jsapi/fxjs_v8_embeddertest.cpp @@ -30,7 +30,7 @@ class FXJSV8Embeddertest : public EmbedderTest { v8::Isolate::Scope isolate_scope(m_pIsolate); v8::HandleScope handle_scope(m_pIsolate); - FXJS_Initialize(0); + FXJS_Initialize(0, nullptr); FXJS_PerIsolateData::SetUp(m_pIsolate); FXJS_InitializeRuntime(m_pIsolate, nullptr, nullptr, m_pPersistentContext); } |