From 378ec548964d57311faab4627e570566bd20aaa0 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Thu, 18 Oct 2018 19:15:47 +0000 Subject: Remove a few V8 includes from header files. Change-Id: I087c4e712aa87f99ada4ef515f5b361037a5dae0 Reviewed-on: https://pdfium-review.googlesource.com/c/44257 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- fxjs/cfx_v8.h | 1 - fxjs/cfxjs_engine.cpp | 5 +++++ fxjs/cfxjs_engine.h | 5 +---- 3 files changed, 6 insertions(+), 5 deletions(-) (limited to 'fxjs') diff --git a/fxjs/cfx_v8.h b/fxjs/cfx_v8.h index 3ebabdefec..70d365517a 100644 --- a/fxjs/cfx_v8.h +++ b/fxjs/cfx_v8.h @@ -11,7 +11,6 @@ #include "core/fxcrt/fx_string.h" #include "core/fxcrt/unowned_ptr.h" -#include "v8/include/v8-util.h" #include "v8/include/v8.h" class CFX_V8 { diff --git a/fxjs/cfxjs_engine.cpp b/fxjs/cfxjs_engine.cpp index f1dd45016e..c993a7dafa 100644 --- a/fxjs/cfxjs_engine.cpp +++ b/fxjs/cfxjs_engine.cpp @@ -15,6 +15,7 @@ #include "fxjs/cjs_object.h" #include "third_party/base/ptr_util.h" #include "third_party/base/stl_util.h" +#include "v8/include/v8-util.h" class CFXJS_PerObjectData; @@ -590,6 +591,10 @@ void CFXJS_Engine::Error(const WideString& message) { GetIsolate()->ThrowException(NewString(message.AsStringView())); } +v8::Local CFXJS_Engine::GetV8Context() { + return v8::Local::New(GetIsolate(), m_V8Context); +} + // static CJS_Object* CFXJS_Engine::GetObjectPrivate(v8::Local pObj) { auto* pData = CFXJS_PerObjectData::GetFromObject(pObj); diff --git a/fxjs/cfxjs_engine.h b/fxjs/cfxjs_engine.h index 0ee4fe5bf4..8c6c69c9be 100644 --- a/fxjs/cfxjs_engine.h +++ b/fxjs/cfxjs_engine.h @@ -22,7 +22,6 @@ #include "core/fxcrt/fx_string.h" #include "fxjs/cfx_v8.h" #include "fxjs/ijs_runtime.h" -#include "v8/include/v8-util.h" #include "v8/include/v8.h" #ifdef PDF_ENABLE_XFA @@ -128,9 +127,7 @@ class CFXJS_Engine : public CFX_V8 { v8::Local NewFXJSBoundObject(int nObjDefnID, FXJSOBJTYPE type); void Error(const WideString& message); - v8::Local GetV8Context() { - return v8::Local::New(GetIsolate(), m_V8Context); - } + v8::Local GetV8Context(); v8::Local GetConstArray(const WideString& name); void SetConstArray(const WideString& name, v8::Local array); -- cgit v1.2.3