From ba038bc14bfeb4d011d57f388871f7f14c4c3c22 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 8 Oct 2015 12:03:00 -0700 Subject: Merge to XFA: Rename IFXJS_Runtime and IFXJS_Context to IJS_. Merge conflicts in: fpdfsdk/src/javascript/Document.cpp fpdfsdk/src/javascript/JS_Define.h New code in: fpdfsdk/include/fpdfxfa/fpdfxfa_doc.h fpdfsdk/src/fpdfxfa/fpdfxfa_doc.cpp (cherry picked from commit 213a172779fddbd7e588ee2e2b3906ccc47d6896) Original Review URL: https://codereview.chromium.org/1386173002 . R=thestig@chromium.org Review URL: https://codereview.chromium.org/1395713002 . --- fpdfsdk/include/jsapi/fxjs_v8.h | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) (limited to 'fpdfsdk/include/jsapi') diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index 750d7a8fae..f4f9d46852 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -4,8 +4,12 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -// PDFium wrapper around V8 APIs. PDFium code should include this file rather -// than including V8 headers directly. +// FXJS_V8 is a layer that makes it easier to define native objects in V8, but +// has no knowledge of PDF-specific native objects. It could in theory be used +// to implement other sets of native objects. + +// PDFium code should include this file rather than including V8 headers +// directly. #ifndef FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ #define FPDFSDK_INCLUDE_JSAPI_FXJS_V8_H_ @@ -15,8 +19,8 @@ // FXJS_V8 places no interpretation on these two classes; it merely // passes them on to the caller-provided FXJS_CONSTRUCTORs. -class IFXJS_Context; -class IFXJS_Runtime; +class IJS_Context; +class IJS_Runtime; // FXJS_V8 places no interpreation on this calass; it merely passes it // along to XFA. @@ -62,7 +66,7 @@ class FXJS_ArrayBufferAllocator : public v8::ArrayBuffer::Allocator { void Free(void* data, size_t length) override; }; -using FXJS_CONSTRUCTOR = void (*)(IFXJS_Context* cc, v8::Local obj); +using FXJS_CONSTRUCTOR = void (*)(IJS_Context* cc, v8::Local obj); using FXJS_DESTRUCTOR = void (*)(v8::Local obj); // Call before making FXJS_PrepareIsolate call. @@ -117,22 +121,22 @@ void FXJS_DefineGlobalConst(v8::Isolate* pIsolate, // Called after FXJS_Define* calls made. void FXJS_InitializeRuntime(v8::Isolate* pIsolate, - IFXJS_Runtime* pFXRuntime, - IFXJS_Context* context, + IJS_Runtime* pFXRuntime, + IJS_Context* context, v8::Global& v8PersistentContext); void FXJS_ReleaseRuntime(v8::Isolate* pIsolate, v8::Global& v8PersistentContext); -IFXJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); +IJS_Runtime* FXJS_GetRuntimeFromIsolate(v8::Isolate* pIsolate); // Called after FXJS_InitializeRuntime call made. int FXJS_Execute(v8::Isolate* pIsolate, - IFXJS_Context* pJSContext, + IJS_Context* pJSContext, const wchar_t* script, long length, FXJSErr* perror); v8::Local FXJS_NewFxDynamicObj(v8::Isolate* pIsolate, - IFXJS_Context* pJSContext, + IJS_Context* pJSContext, int nObjDefnID); v8::Local FXJS_GetThisObj(v8::Isolate* pIsolate); int FXJS_GetObjDefnID(v8::Local pObj); -- cgit v1.2.3