Move some v8 objects from CJS back into FXJS
Create a new class to hold these, CFXJS_Engine (could have been
called Runtime, but there are too many "Runtimes" already). In a
subsequent patch, all the FXJS_*() functions that take an isolate
as the first argument can become methods on the engine.
CJS_ must still manage the isolates; this happens outside
the engine.
The IJS_Runtime abstraction moves up to fpdfsdk/javascript; it
remains to allow for either a real JS library or a stubb one to
be linked (for non-js builds).
Review-Url: https://codereview.chromium.org/2241483004
diff --git a/fpdfsdk/javascript/Consts.cpp b/fpdfsdk/javascript/Consts.cpp
index b71d0a3..19988a6 100644
--- a/fpdfsdk/javascript/Consts.cpp
+++ b/fpdfsdk/javascript/Consts.cpp
@@ -148,7 +148,7 @@
(rt)->GetIsolate(), (name), \
[](const v8::FunctionCallbackInfo<v8::Value>& info) { \
CJS_Runtime* pLocalRuntime = static_cast<CJS_Runtime*>( \
- FXJS_GetRuntimeFromIsolate(info.GetIsolate())); \
+ FXJS_GetCurrentEngineFromIsolate(info.GetIsolate())); \
if (pLocalRuntime) \
info.GetReturnValue().Set(pLocalRuntime->GetConstArray(name)); \
}); \