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

Unified Diff: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp

Issue 2013963005: Replace FXJSE_HCONTEXT with CFXJSE_Context* (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
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/fxfa/fm2js/xfa_fm2jscontext.h ('k') | xfa/fxfa/parser/xfa_script_imp.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
diff --git a/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/xfa_fm2jscontext.cpp
index 7f0514eca0a9b17fbae157b8b5231f3c1a770384..f875ad27137a36f49243ce4fd0b5af1d1aad0257 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);
}
« no previous file with comments | « xfa/fxfa/fm2js/xfa_fm2jscontext.h ('k') | xfa/fxfa/parser/xfa_script_imp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698