summaryrefslogtreecommitdiff
path: root/xfa/src/fxjse
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
committerTom Sepez <tsepez@chromium.org>2015-06-10 14:33:37 -0700
commitd7e5cc754a937605d1f73db5e7967c58ddd80742 (patch)
treeed28e012c4d6a46b7f29f15a0c060474c27d4286 /xfa/src/fxjse
parentbfa9a824a20f37c2dd7111012b46c929cf2ed8a0 (diff)
downloadpdfium-d7e5cc754a937605d1f73db5e7967c58ddd80742.tar.xz
Merge to XFA: Remove typdefs for pointer types in fx_system.h.
Original Review URL: https://codereview.chromium.org/1171733003 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1178613002.
Diffstat (limited to 'xfa/src/fxjse')
-rw-r--r--xfa/src/fxjse/src/class.cpp4
-rw-r--r--xfa/src/fxjse/src/context.cpp10
-rw-r--r--xfa/src/fxjse/src/context.h4
-rw-r--r--xfa/src/fxjse/src/runtime.cpp2
-rw-r--r--xfa/src/fxjse/src/util_inline.h4
-rw-r--r--xfa/src/fxjse/src/value.cpp10
-rw-r--r--xfa/src/fxjse/src/value.h4
7 files changed, 19 insertions, 19 deletions
diff --git a/xfa/src/fxjse/src/class.cpp b/xfa/src/fxjse/src/class.cpp
index 735a77f1f1..42db877fc9 100644
--- a/xfa/src/fxjse/src/class.cpp
+++ b/xfa/src/fxjse/src/class.cpp
@@ -168,7 +168,7 @@ CFX_ByteString CFXJSE_Arguments::GetUTF8String(int32_t index) const
v8::String::Utf8Value szStringVal(hString);
return CFX_ByteString(*szStringVal);
}
-FX_LPVOID CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass ) const
+void* CFXJSE_Arguments::GetObject(int32_t index, FXJSE_HCLASS hClass ) const
{
const CFXJSE_ArgumentsImpl* lpArguments = reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
v8::Local<v8::Value> hValue = (*lpArguments->m_pInfo)[index];
@@ -193,7 +193,7 @@ static void FXJSE_Context_GlobalObjToString(const v8::FunctionCallbackInfo<v8::V
if(info.This() == info.Holder() && lpClass->name) {
CFX_ByteString szStringVal;
szStringVal.Format("[object %s]", lpClass->name);
- info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), (FX_LPCSTR)szStringVal, v8::String::kNormalString, szStringVal.GetLength()));
+ info.GetReturnValue().Set(v8::String::NewFromUtf8(info.GetIsolate(), (const FX_CHAR*)szStringVal, v8::String::kNormalString, szStringVal.GetLength()));
} else {
info.GetReturnValue().Set(info.This()->ObjectProtoToString());
}
diff --git a/xfa/src/fxjse/src/context.cpp b/xfa/src/fxjse/src/context.cpp
index d2b10db38d..3aee73203e 100644
--- a/xfa/src/fxjse/src/context.cpp
+++ b/xfa/src/fxjse/src/context.cpp
@@ -11,7 +11,7 @@
#include "value.h"
#include "scope_inline.h"
#include "util_inline.h"
-FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass , FX_LPVOID lpGlobalObject )
+FXJSE_HCONTEXT FXJSE_Context_Create(FXJSE_HRUNTIME hRuntime, const FXJSE_CLASS* lpGlobalClass , void* lpGlobalObject )
{
CFXJSE_Context* pContext = CFXJSE_Context::Create(reinterpret_cast<v8::Isolate*>(hRuntime), lpGlobalClass, lpGlobalObject);
return reinterpret_cast<FXJSE_HCONTEXT>(pContext);
@@ -39,7 +39,7 @@ FXJSE_HRUNTIME FXJSE_Context_GetRuntime(FXJSE_HCONTEXT hContext)
CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext);
return pContext ? reinterpret_cast<FXJSE_HRUNTIME>(pContext->GetRuntime()) : NULL;
}
-static FX_LPCSTR szCompatibleModeScripts[] = {
+static const FX_CHAR* szCompatibleModeScripts[] = {
"(function (global, list) { 'use strict'; var objname; for (objname in list) { var globalobj = global[objname];\n\
if (globalobj) { list[objname].forEach( function (name) { if (!globalobj[name]) { Object.defineProperty(globalobj, name, {writable: true, enumerable: false, value: \n\
(function (obj) {\n\
@@ -57,7 +57,7 @@ void FXJSE_Context_EnableCompatibleMode(FXJSE_HCONTEXT hContext, FX_DWORD dwComp
}
}
}
-FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, FX_LPCSTR szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject )
+FX_BOOL FXJSE_ExecuteScript(FXJSE_HCONTEXT hContext, const FX_CHAR* szScript, FXJSE_HVALUE hRetValue, FXJSE_HVALUE hNewThisObject )
{
CFXJSE_Context* pContext = reinterpret_cast<CFXJSE_Context*>(hContext);
ASSERT(pContext);
@@ -129,7 +129,7 @@ FX_BOOL FXJSE_ReturnValue_GetLineInfo(FXJSE_HVALUE hRetValue, int32_t& nLine, in
nCol = hValue.As<v8::Object>()->Get(5)->ToInt32()->Value();
return TRUE;
}
-CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass , FX_LPVOID lpGlobalObject )
+CFXJSE_Context* CFXJSE_Context::Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass , void* lpGlobalObject )
{
CFXJSE_ScopeUtil_IsolateHandle scope(pIsolate);
CFXJSE_Context* pContext = FX_NEW CFXJSE_Context(pIsolate);
@@ -179,7 +179,7 @@ void CFXJSE_Context::GetGlobalObject(CFXJSE_Value* pValue)
v8::Local<v8::Object> hGlobalObject = hContext->Global();
pValue->ForceSetValue(hGlobalObject);
}
-FX_BOOL CFXJSE_Context::ExecuteScript(FX_LPCSTR szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject )
+FX_BOOL CFXJSE_Context::ExecuteScript(const FX_CHAR* szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject )
{
CFXJSE_ScopeUtil_IsolateHandleContext scope(this);
v8::TryCatch trycatch;
diff --git a/xfa/src/fxjse/src/context.h b/xfa/src/fxjse/src/context.h
index 973536932b..69ee7acce5 100644
--- a/xfa/src/fxjse/src/context.h
+++ b/xfa/src/fxjse/src/context.h
@@ -13,14 +13,14 @@ class CFXJSE_Context
protected:
CFXJSE_Context(v8::Isolate* pIsolate) : m_pIsolate(pIsolate) {}
public:
- static CFXJSE_Context* Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass = NULL, FX_LPVOID lpGlobalObject = NULL);
+ static CFXJSE_Context* Create(v8::Isolate* pIsolate, const FXJSE_CLASS* lpGlobalClass = NULL, void* lpGlobalObject = NULL);
~CFXJSE_Context();
V8_INLINE v8::Isolate* GetRuntime(void)
{
return m_pIsolate;
}
void GetGlobalObject(CFXJSE_Value* pValue);
- FX_BOOL ExecuteScript(FX_LPCSTR szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject = NULL);
+ FX_BOOL ExecuteScript(const FX_CHAR* szScript, CFXJSE_Value* lpRetValue, CFXJSE_Value* lpNewThisObject = NULL);
protected:
CFXJSE_Context();
CFXJSE_Context(const CFXJSE_Context&);
diff --git a/xfa/src/fxjse/src/runtime.cpp b/xfa/src/fxjse/src/runtime.cpp
index 6f0dbf7601..e47c5b1a3b 100644
--- a/xfa/src/fxjse/src/runtime.cpp
+++ b/xfa/src/fxjse/src/runtime.cpp
@@ -38,7 +38,7 @@ void FXJSE_Initialize()
}
bV8Initialized = TRUE;
atexit(FXJSE_KillV8);
- FX_LPCSTR szCmdFlags =
+ const FX_CHAR* szCmdFlags =
"--harmony_proxies "
"--block_concurrent_recompilation "
;
diff --git a/xfa/src/fxjse/src/util_inline.h b/xfa/src/fxjse/src/util_inline.h
index 517b5545e8..3425465844 100644
--- a/xfa/src/fxjse/src/util_inline.h
+++ b/xfa/src/fxjse/src/util_inline.h
@@ -10,13 +10,13 @@ static V8_INLINE v8::Local<v8::Object> FXJSE_GetGlobalObjectFromContext(const v8
{
return hContext->Global()->GetPrototype().As<v8::Object>();
}
-static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, FX_LPVOID lpNewBinding)
+static V8_INLINE void FXJSE_UpdateObjectBinding(v8::Local<v8::Object>& hObject, void* lpNewBinding)
{
ASSERT(!hObject.IsEmpty());
ASSERT(hObject->InternalFieldCount() > 0);
hObject->SetAlignedPointerInInternalField(0, lpNewBinding);
}
-static V8_INLINE FX_LPVOID FXJSE_RetrieveObjectBinding(const v8::Local<v8::Object>& hJSObject, CFXJSE_Class* lpClass = NULL)
+static V8_INLINE void* FXJSE_RetrieveObjectBinding(const v8::Local<v8::Object>& hJSObject, CFXJSE_Class* lpClass = NULL)
{
ASSERT(!hJSObject.IsEmpty());
if(!hJSObject->IsObject()) {
diff --git a/xfa/src/fxjse/src/value.cpp b/xfa/src/fxjse/src/value.cpp
index 783961657a..8b5b5feb92 100644
--- a/xfa/src/fxjse/src/value.cpp
+++ b/xfa/src/fxjse/src/value.cpp
@@ -90,7 +90,7 @@ int32_t FXJSE_Value_ToInteger (FXJSE_HVALUE hValue)
ASSERT(lpValue);
return lpValue->ToInteger();
}
-FX_LPVOID FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass)
+void* FXJSE_Value_ToObject (FXJSE_HVALUE hValue, FXJSE_HCLASS hClass)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
@@ -139,7 +139,7 @@ void FXJSE_Value_SetDouble (FXJSE_HVALUE hValue, FXJSE_DOUBLE dDouble)
ASSERT(lpValue);
return lpValue->SetDouble(dDouble);
}
-void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, FX_LPVOID lpObject, FXJSE_HCLASS hClass)
+void FXJSE_Value_SetObject (FXJSE_HVALUE hValue, void* lpObject, FXJSE_HCLASS hClass)
{
CFXJSE_Value* lpValue = reinterpret_cast<CFXJSE_Value*>(hValue);
CFXJSE_Class* lpClass = reinterpret_cast<CFXJSE_Class*>(hClass);
@@ -276,7 +276,7 @@ CFXJSE_Value* CFXJSE_Value::Create(v8::Isolate* pIsolate)
{
return FX_NEW CFXJSE_Value(pIsolate);
}
-FX_LPVOID CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const
+void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const
{
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
@@ -330,7 +330,7 @@ void CFXJSE_Value::SetFloat(FX_FLOAT fFloat)
v8::Local<v8::Value> hValue = v8::Number::New(m_pIsolate, FXJSE_ftod(fFloat));
m_hValue.Reset(m_pIsolate, hValue);
}
-void CFXJSE_Value::SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass)
+void CFXJSE_Value::SetHostObject(void* lpObject, CFXJSE_Class* lpClass)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
ASSERT(lpClass);
@@ -453,7 +453,7 @@ FX_BOOL CFXJSE_Value::SetFunctionBind(CFXJSE_Value* lpOldFunction, CFXJSE_Value*
m_hValue.Reset(m_pIsolate, hBoundFunction);
return TRUE;
}
-#define FXJSE_INVALID_PTR ((FX_LPVOID)(intptr_t)-1)
+#define FXJSE_INVALID_PTR ((void*)(intptr_t)-1)
FX_BOOL CFXJSE_Value::Call(CFXJSE_Value* lpReceiver, CFXJSE_Value* lpRetValue, uint32_t nArgCount, FXJSE_HVALUE* lpArgs)
{
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
diff --git a/xfa/src/fxjse/src/value.h b/xfa/src/fxjse/src/value.h
index 482015811b..db8a4faa95 100644
--- a/xfa/src/fxjse/src/value.h
+++ b/xfa/src/fxjse/src/value.h
@@ -144,7 +144,7 @@ public:
v8::String::Utf8Value hStringVal(hString);
szStrOutput = *hStringVal;
}
- FX_LPVOID ToObject(CFXJSE_Class* lpClass) const;
+ void* ToObject(CFXJSE_Class* lpClass) const;
public:
V8_INLINE void SetUndefined()
{
@@ -191,7 +191,7 @@ public:
v8::Local<v8::Value> hValue = v8::Object::New(m_pIsolate);
m_hValue.Reset(m_pIsolate, hValue);
}
- void SetHostObject(FX_LPVOID lpObject, CFXJSE_Class* lpClass);
+ void SetHostObject(void* lpObject, CFXJSE_Class* lpClass);
void SetArray(uint32_t uValueCount, CFXJSE_Value** rgValues);
void SetDate(FXJSE_DOUBLE dDouble);
public: