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

Unified Diff: xfa/fxjse/value.cpp

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/value.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxjse/value.cpp
diff --git a/xfa/fxjse/value.cpp b/xfa/fxjse/value.cpp
index 6cdbb14aa3a4a61bb23591f0f5e99c4287aeaedf..b369c0bf3b7c19d18c31b5e4b831277645574641 100644
--- a/xfa/fxjse/value.cpp
+++ b/xfa/fxjse/value.cpp
@@ -64,7 +64,8 @@ int32_t FXJSE_Value_ToInteger(CFXJSE_Value* pValue) {
return pValue->ToInteger();
}
-void* FXJSE_Value_ToObject(CFXJSE_Value* pValue, CFXJSE_Class* pClass) {
+CFXJSE_HostObject* FXJSE_Value_ToObject(CFXJSE_Value* pValue,
+ CFXJSE_Class* pClass) {
return pValue->ToObject(pClass);
}
@@ -98,14 +99,14 @@ void FXJSE_Value_SetDouble(CFXJSE_Value* pValue, double dDouble) {
}
void FXJSE_Value_SetObject(CFXJSE_Value* pValue,
- void* lpObject,
+ CFXJSE_HostObject* lpObject,
CFXJSE_Class* pClass) {
if (!pClass) {
ASSERT(!lpObject);
pValue->SetJSObject();
- } else {
- pValue->SetHostObject(lpObject, pClass);
+ return;
}
+ pValue->SetHostObject(lpObject, pClass);
}
void FXJSE_Value_SetArray(CFXJSE_Value* pValue,
@@ -197,7 +198,7 @@ void FXJSE_ThrowMessage(const CFX_ByteStringC& utf8Name,
pIsolate->ThrowException(hError);
}
-void* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
+CFXJSE_HostObject* CFXJSE_Value::ToObject(CFXJSE_Class* lpClass) const {
ASSERT(!m_hValue.IsEmpty());
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
@@ -256,7 +257,8 @@ void CFXJSE_Value::SetFloat(FX_FLOAT fFloat) {
m_hValue.Reset(m_pIsolate, pValue);
}
-void CFXJSE_Value::SetHostObject(void* lpObject, CFXJSE_Class* lpClass) {
+void CFXJSE_Value::SetHostObject(CFXJSE_HostObject* lpObject,
+ CFXJSE_Class* lpClass) {
CFXJSE_ScopeUtil_IsolateHandleRootContext scope(m_pIsolate);
ASSERT(lpClass);
v8::Local<v8::FunctionTemplate> hClass =
« no previous file with comments | « xfa/fxjse/value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698