Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: xfa/fxjse/include/fxjse.h

Issue 2019333006: Replace void* with CFXJSE_HostObect and make wrapped objects inherit from it (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Another blown merge Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxjse/context.cpp ('k') | xfa/fxjse/value.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxjse/include/fxjse.h
diff --git a/xfa/fxjse/include/fxjse.h b/xfa/fxjse/include/fxjse.h
index e432858603c117ec34228585ac04239b0004f11c..4a85251c0392eededdadba4f56d65f4284a35abf 100644
--- a/xfa/fxjse/include/fxjse.h
+++ b/xfa/fxjse/include/fxjse.h
@@ -16,6 +16,8 @@ class CFXJSE_Class;
class CFXJSE_Context;
class CFXJSE_Value;
+class CFXJSE_HostObject {}; // C++ object which can be wrapped by CFXJSE_value.
+
typedef void (*FXJSE_FuncCallback)(CFXJSE_Value* pThis,
const CFX_ByteStringC& szFuncName,
CFXJSE_Arguments& args);
@@ -73,7 +75,7 @@ void FXJSE_Runtime_Release(v8::Isolate* pIsolate, bool bOwnedRuntime);
CFXJSE_Context* FXJSE_Context_Create(
v8::Isolate* pIsolate,
const FXJSE_CLASS_DESCRIPTOR* lpGlobalClass,
- void* lpGlobalObject);
+ CFXJSE_HostObject* lpGlobalObject);
void FXJSE_Context_Release(CFXJSE_Context* pContext);
CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext);
@@ -98,7 +100,8 @@ double FXJSE_Value_ToDouble(CFXJSE_Value* pValue);
int32_t FXJSE_Value_ToInteger(CFXJSE_Value* pValue);
void FXJSE_Value_ToUTF8String(CFXJSE_Value* pValue,
CFX_ByteString& szStrOutput);
-void* FXJSE_Value_ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass);
+CFXJSE_HostObject* FXJSE_Value_ToObject(CFXJSE_Value* pValue,
+ CFXJSE_Class* pClass);
void FXJSE_Value_SetUndefined(CFXJSE_Value* pValue);
void FXJSE_Value_SetNull(CFXJSE_Value* pValue);
@@ -109,7 +112,7 @@ void FXJSE_Value_SetInteger(CFXJSE_Value* pValue, int32_t nInteger);
void FXJSE_Value_SetFloat(CFXJSE_Value* pValue, FX_FLOAT fFloat);
void FXJSE_Value_SetDouble(CFXJSE_Value* pValue, double dDouble);
void FXJSE_Value_SetObject(CFXJSE_Value* pValue,
- void* lpObject,
+ CFXJSE_HostObject* lpObject,
CFXJSE_Class* pClass);
void FXJSE_Value_SetArray(CFXJSE_Value* pValue,
uint32_t uValueCount,
« no previous file with comments | « xfa/fxjse/context.cpp ('k') | xfa/fxjse/value.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698