From fb25606e584e14d60fc243e8b56eef399a4a54bd Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 1 Feb 2018 19:23:03 +0000 Subject: Make FXJSE_Engine constructed from FXJS_Engine. No change in functionality yet, just passing higher level object. Precursor to maybe sharing v8 context between fxjs / fxjse. Mark unimplemented ctors / assignment operator as "delete". Change-Id: I100de7755909eec2eed96f6f51216d85923ffbb2 Reviewed-on: https://pdfium-review.googlesource.com/25050 Commit-Queue: Tom Sepez Reviewed-by: dsinclair --- fxjs/cfxjse_engine.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fxjs/cfxjse_engine.cpp') diff --git a/fxjs/cfxjse_engine.cpp b/fxjs/cfxjse_engine.cpp index 325895f566..6b3ea1014d 100644 --- a/fxjs/cfxjse_engine.cpp +++ b/fxjs/cfxjse_engine.cpp @@ -14,6 +14,7 @@ #include "fxjs/cfxjse_class.h" #include "fxjs/cfxjse_resolveprocessor.h" #include "fxjs/cfxjse_value.h" +#include "fxjs/fxjs_v8.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" #include "xfa/fxfa/cxfa_eventparam.h" @@ -91,10 +92,11 @@ CXFA_Object* CFXJSE_Engine::ToObject(CFXJSE_Value* pValue, return static_cast(pHostObj); } -CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument, v8::Isolate* pIsolate) - : CJS_V8(pIsolate), +CFXJSE_Engine::CFXJSE_Engine(CXFA_Document* pDocument, + CFXJS_Engine* fxjs_engine) + : CJS_V8(fxjs_engine->GetIsolate()), m_pDocument(pDocument), - m_JsContext(CFXJSE_Context::Create(pIsolate, + m_JsContext(CFXJSE_Context::Create(fxjs_engine->GetIsolate(), &GlobalClassDescriptor, pDocument->GetRoot())), m_pJsClass(nullptr), -- cgit v1.2.3