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

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

Issue 2000443002: Remove Release() from CXFA_FM2JSContext (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 | « no previous file | xfa/fxfa/fm2js/xfa_fm2jscontext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
diff --git a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
index 147869dfb1e363f5f1bb021d44b9608eccb167d2..2c02c347f37cfab802eaf8d70977870c5a746d95 100644
--- a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
+++ b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
@@ -39,7 +39,7 @@ int32_t XFA_FM2JS_Translate(const CFX_WideStringC& wsFormcalc,
return 0;
}
XFA_HFM2JSCONTEXT XFA_FM2JS_ContextCreate() {
- return (XFA_HFM2JSCONTEXT)CXFA_FM2JSContext::Create();
+ return reinterpret_cast<XFA_HFM2JSCONTEXT>(new CXFA_FM2JSContext);
}
void XFA_FM2JS_ContextInitialize(XFA_HFM2JSCONTEXT hFM2JSContext,
FXJSE_HRUNTIME hScriptRuntime,
@@ -56,9 +56,7 @@ void XFA_FM2JS_GlobalPropertyGetter(XFA_HFM2JSCONTEXT hFM2JSContext,
pContext->GlobalPropertyGetter(hValue);
}
void XFA_FM2JS_ContextRelease(XFA_HFM2JSCONTEXT hFM2JSContext) {
- CXFA_FM2JSContext* pContext =
- reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
- pContext->Release();
+ delete reinterpret_cast<CXFA_FM2JSContext*>(hFM2JSContext);
}
#ifdef __cplusplus
}
« no previous file with comments | « no previous file | xfa/fxfa/fm2js/xfa_fm2jscontext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698