diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-10-07 10:17:53 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-10-07 10:17:53 -0700 |
commit | a72e8e2c4392df725c7e35ed1ae3f891e79e49ec (patch) | |
tree | 99eb91f764c428cd34a3b84e8b9e9bfb239d9e5a /fpdfsdk/include/jsapi | |
parent | cd56a7d6fb05bd0babf316a84280a26ecc649d45 (diff) | |
download | pdfium-a72e8e2c4392df725c7e35ed1ae3f891e79e49ec.tar.xz |
Merge to XFA: Pass v8::Isolate to PDFium at init time.
New code changes in JS_Runtime.cpp.
(cherry picked from commit 3dedace9623fef6161a8666e53a4ab2b9be61e4c)
Original Review URL: https://codereview.chromium.org/1367033002 .
Also merge to XFA: Run FXJS_V8 embedder tests against a shared isolate,
since the two go together.
(cherry picked from commit 4ea721cb7954898a9722c389dae86c62957352d0)
Original Review URL: https://codereview.chromium.org/1377293004 .
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1381633008 .
Diffstat (limited to 'fpdfsdk/include/jsapi')
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index f51340acd3..6e8d2fa478 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -68,9 +68,14 @@ using FXJS_CONSTRUCTOR = void (*)(IFXJS_Context* cc, using FXJS_DESTRUCTOR = void (*)(v8::Local<v8::Object> obj); // Call before making FXJS_PrepareIsolate call. -void FXJS_Initialize(unsigned int embedderDataSlot); +void FXJS_Initialize(unsigned int embedderDataSlot, v8::Isolate* pIsolate); void FXJS_Release(); +// Gets the global isolate set by FXJS_Initialize(), or makes a new one each +// time if there is no such isolate. Returns true if a new isolate had to be +// created. +bool FXJS_GetIsolate(v8::Isolate** pResultIsolate); + // Call before making FXJS_Define* calls. Resources allocated here are cleared // as part of FXJS_ReleaseRuntime(). void FXJS_PrepareIsolate(v8::Isolate* pIsolate); |