summaryrefslogtreecommitdiff
path: root/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-19 16:17:32 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-19 16:17:32 -0700
commitbc2f0c5c4e3bbb5f317c29716c2b94af03c38329 (patch)
tree6d6df66ff6be2b0af0de4aca90f0bace91849285 /xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
parent39faf4fde606fa3b71d2b6b232cff3e86cb1303f (diff)
downloadpdfium-bc2f0c5c4e3bbb5f317c29716c2b94af03c38329.tar.xz
Remove Release() from CXFA_FM2JSContext
BUG= Review-Url: https://codereview.chromium.org/2000443002
Diffstat (limited to 'xfa/fxfa/fm2js/xfa_fm2jsapi.cpp')
-rw-r--r--xfa/fxfa/fm2js/xfa_fm2jsapi.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp b/xfa/fxfa/fm2js/xfa_fm2jsapi.cpp
index 147869dfb1..2c02c347f3 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
}