summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff options
context:
space:
mode:
authordsinclair <dsinclair@chromium.org>2016-05-26 09:40:27 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-26 09:40:27 -0700
commit7f2abcc015583e63cceb52acde757cb2111420bd (patch)
treee8dc22bf5164f0c703ff4dda86447b85002c865d /xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
parentcfaffc09b1d62a81679fb01b0cc85e050be969b7 (diff)
downloadpdfium-7f2abcc015583e63cceb52acde757cb2111420bd.tar.xz
Replace FXJSE_HCONTEXT with CFXJSE_Context*
This Cl removes FXJSE_HCONTEXT and replaces it with the concrete CFXJSE_Context. All varibles have been updated as well to match the new type. Review-Url: https://codereview.chromium.org/2013963005
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jscontext.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jscontext.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 7f0514eca0..f875ad2713 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
@@ -3239,16 +3239,16 @@ void CXFA_FM2JSContext::Eval(FXJSE_HOBJECT hThis,
XFA_FM2JS_Translate(
CFX_WideString::FromUTF8(utf8ScriptString.AsStringC()).AsStringC(),
wsJavaScriptBuf, wsError);
- FXJSE_HCONTEXT hContext = FXJSE_Context_Create(pIsolate);
+ CFXJSE_Context* pContext = FXJSE_Context_Create(pIsolate);
FXJSE_HVALUE returnValue = FXJSE_Value_Create(pIsolate);
javaScript = wsJavaScriptBuf.AsStringC();
FXJSE_ExecuteScript(
- hContext,
+ pContext,
FX_UTF8Encode(javaScript.c_str(), javaScript.GetLength()).c_str(),
returnValue);
FXJSE_Value_Set(args.GetReturnValue(), returnValue);
FXJSE_Value_Release(returnValue);
- FXJSE_Context_Release(hContext);
+ FXJSE_Context_Release(pContext);
}
FXJSE_Value_Release(scriptValue);
} else {
@@ -7175,11 +7175,11 @@ CXFA_FM2JSContext::~CXFA_FM2JSContext() {
}
m_pIsolate = NULL;
}
-void CXFA_FM2JSContext::Initialize(v8::Isolate* hScriptRuntime,
- FXJSE_HCONTEXT hScriptContext,
+void CXFA_FM2JSContext::Initialize(v8::Isolate* pScriptIsolate,
+ CFXJSE_Context* pScriptContext,
CXFA_Document* pDoc) {
m_pDocument = pDoc;
- m_pIsolate = hScriptRuntime;
+ m_pIsolate = pScriptIsolate;
m_fmClass.name = "XFA_FM2JS_FormCalcClass";
m_fmClass.constructor = NULL;
m_fmClass.properties = NULL;
@@ -7187,8 +7187,8 @@ void CXFA_FM2JSContext::Initialize(v8::Isolate* hScriptRuntime,
m_fmClass.propNum = 0;
m_fmClass.methNum =
sizeof(formcalc_fm2js_functions) / sizeof(formcalc_fm2js_functions[0]);
- m_hFMClass = FXJSE_DefineClass(hScriptContext, &m_fmClass);
- m_hValue = FXJSE_Value_Create(hScriptRuntime);
+ m_hFMClass = FXJSE_DefineClass(pScriptContext, &m_fmClass);
+ m_hValue = FXJSE_Value_Create(pScriptIsolate);
FXJSE_Value_SetNull(m_hValue);
FXJSE_Value_SetObject(m_hValue, this, m_hFMClass);
}