summaryrefslogtreecommitdiff
path: root/xfa/fxjse/context.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-26 11:14:08 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 11:14:08 -0700
commit12a6b0c1bb3ab86a03a84464bed168995ae0d82a (patch)
tree03c381e1eb6afd47f14c76cc3f9b91641a603dff /xfa/fxjse/context.cpp
parentd3e354a43531eaed87e43d9ff2df4525186ea28d (diff)
downloadpdfium-12a6b0c1bb3ab86a03a84464bed168995ae0d82a.tar.xz
Remove FXJSE_HOBJECT and FXJSE_HVALUE for CFXJSE_Value*
This CL replaces FXJSE_HOBJECT and FXJSE_HVALUE with the concrete CFXJSE_Value* type. All variables are renamed to match. Review-Url: https://codereview.chromium.org/2012253002
Diffstat (limited to 'xfa/fxjse/context.cpp')
-rw-r--r--xfa/fxjse/context.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/xfa/fxjse/context.cpp b/xfa/fxjse/context.cpp
index 76df5616e5..bdc31e4594 100644
--- a/xfa/fxjse/context.cpp
+++ b/xfa/fxjse/context.cpp
@@ -21,14 +21,14 @@ void FXJSE_Context_Release(CFXJSE_Context* pContext) {
delete pContext;
}
-FXJSE_HVALUE FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext) {
+CFXJSE_Value* FXJSE_Context_GetGlobalObject(CFXJSE_Context* pContext) {
if (!pContext)
return nullptr;
CFXJSE_Value* lpValue = CFXJSE_Value::Create(pContext->GetRuntime());
ASSERT(lpValue);
pContext->GetGlobalObject(lpValue);
- return reinterpret_cast<FXJSE_HVALUE>(lpValue);
+ return lpValue;
}
static const FX_CHAR* szCompatibleModeScripts[] = {
@@ -68,11 +68,9 @@ void FXJSE_Context_EnableCompatibleMode(CFXJSE_Context* pContext,
FX_BOOL FXJSE_ExecuteScript(CFXJSE_Context* pContext,
const FX_CHAR* szScript,
- FXJSE_HVALUE hRetValue,
- FXJSE_HVALUE hNewThisObject) {
- return pContext->ExecuteScript(
- szScript, reinterpret_cast<CFXJSE_Value*>(hRetValue),
- reinterpret_cast<CFXJSE_Value*>(hNewThisObject));
+ CFXJSE_Value* pRetValue,
+ CFXJSE_Value* pNewThisObject) {
+ return pContext->ExecuteScript(szScript, pRetValue, pNewThisObject);
}
v8::Local<v8::Object> FXJSE_CreateReturnValue(v8::Isolate* pIsolate,