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

Unified Diff: xfa/fxjse/class.cpp

Issue 2012253002: Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@fxjse_hclass
Patch Set: 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/cfxjse_arguments.h ('k') | xfa/fxjse/context.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxjse/class.cpp
diff --git a/xfa/fxjse/class.cpp b/xfa/fxjse/class.cpp
index 6d0a719821004f1103af05c262641501fa99a7ee..a2f414620860f329da1d1d73738f525968ddfa1d 100644
--- a/xfa/fxjse/class.cpp
+++ b/xfa/fxjse/class.cpp
@@ -42,8 +42,7 @@ static void FXJSE_V8FunctionCallback_Wrapper(
lpThisValue->ForceSetValue(info.This());
CFXJSE_Value* lpRetValue = CFXJSE_Value::Create(info.GetIsolate());
CFXJSE_ArgumentsImpl impl = {&info, lpRetValue};
- lpFunctionInfo->callbackProc(reinterpret_cast<FXJSE_HOBJECT>(lpThisValue),
- szFunctionName,
+ lpFunctionInfo->callbackProc(lpThisValue, szFunctionName,
reinterpret_cast<CFXJSE_Arguments&>(impl));
if (!lpRetValue->DirectGetValue().IsEmpty()) {
info.GetReturnValue().Set(lpRetValue->DirectGetValue());
@@ -66,8 +65,7 @@ static void FXJSE_V8ClassGlobalConstructorCallback_Wrapper(
lpThisValue->ForceSetValue(info.This());
CFXJSE_Value* lpRetValue = CFXJSE_Value::Create(info.GetIsolate());
CFXJSE_ArgumentsImpl impl = {&info, lpRetValue};
- lpClassDefinition->constructor(reinterpret_cast<FXJSE_HOBJECT>(lpThisValue),
- szFunctionName,
+ lpClassDefinition->constructor(lpThisValue, szFunctionName,
reinterpret_cast<CFXJSE_Arguments&>(impl));
if (!lpRetValue->DirectGetValue().IsEmpty()) {
info.GetReturnValue().Set(lpRetValue->DirectGetValue());
@@ -90,9 +88,7 @@ static void FXJSE_V8GetterCallback_Wrapper(
CFXJSE_Value* lpThisValue = CFXJSE_Value::Create(info.GetIsolate());
CFXJSE_Value* lpPropValue = CFXJSE_Value::Create(info.GetIsolate());
lpThisValue->ForceSetValue(info.This());
- lpPropertyInfo->getProc(reinterpret_cast<FXJSE_HOBJECT>(lpThisValue),
- szPropertyName,
- reinterpret_cast<FXJSE_HVALUE>(lpPropValue));
+ lpPropertyInfo->getProc(lpThisValue, szPropertyName, lpPropValue);
info.GetReturnValue().Set(lpPropValue->DirectGetValue());
delete lpThisValue;
lpThisValue = NULL;
@@ -114,9 +110,7 @@ static void FXJSE_V8SetterCallback_Wrapper(
CFXJSE_Value* lpPropValue = CFXJSE_Value::Create(info.GetIsolate());
lpThisValue->ForceSetValue(info.This());
lpPropValue->ForceSetValue(value);
- lpPropertyInfo->setProc(reinterpret_cast<FXJSE_HOBJECT>(lpThisValue),
- szPropertyName,
- reinterpret_cast<FXJSE_HVALUE>(lpPropValue));
+ lpPropertyInfo->setProc(lpThisValue, szPropertyName, lpPropValue);
delete lpThisValue;
lpThisValue = NULL;
delete lpPropValue;
@@ -146,13 +140,13 @@ int32_t CFXJSE_Arguments::GetLength() const {
return lpArguments->m_pInfo->Length();
}
-FXJSE_HVALUE CFXJSE_Arguments::GetValue(int32_t index) const {
+CFXJSE_Value* CFXJSE_Arguments::GetValue(int32_t index) const {
const CFXJSE_ArgumentsImpl* lpArguments =
reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
CFXJSE_Value* lpArgValue = CFXJSE_Value::Create(v8::Isolate::GetCurrent());
ASSERT(lpArgValue);
lpArgValue->ForceSetValue((*lpArguments->m_pInfo)[index]);
- return reinterpret_cast<FXJSE_HVALUE>(lpArgValue);
+ return lpArgValue;
}
FX_BOOL CFXJSE_Arguments::GetBoolean(int32_t index) const {
@@ -192,10 +186,10 @@ void* CFXJSE_Arguments::GetObject(int32_t index, CFXJSE_Class* pClass) const {
return FXJSE_RetrieveObjectBinding(hValue.As<v8::Object>(), pClass);
}
-FXJSE_HVALUE CFXJSE_Arguments::GetReturnValue() {
+CFXJSE_Value* CFXJSE_Arguments::GetReturnValue() {
const CFXJSE_ArgumentsImpl* lpArguments =
reinterpret_cast<const CFXJSE_ArgumentsImpl* const>(this);
- return reinterpret_cast<FXJSE_HVALUE>(lpArguments->m_pRetValue);
+ return lpArguments->m_pRetValue;
}
static void FXJSE_Context_GlobalObjToString(
const v8::FunctionCallbackInfo<v8::Value>& info) {
« no previous file with comments | « xfa/fxjse/cfxjse_arguments.h ('k') | xfa/fxjse/context.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698