summaryrefslogtreecommitdiff
path: root/fxjs/cfxjse_formcalc_context.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-07-23 18:03:44 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-07-23 18:03:44 +0000
commit721f5fa5061f2dec8282b7bde48c9d4721208b7a (patch)
treeef73827b16830ae0fe3f535783aa34b194f8257a /fxjs/cfxjse_formcalc_context.h
parent3ba611a551efb23518ac16f8bb23ab5ac4ca2c59 (diff)
downloadpdfium-721f5fa5061f2dec8282b7bde48c9d4721208b7a.tar.xz
Replace CFXJSE_HostObject::type_ with polymorphic conversion methods
More foolproof technique, and saves one word in every instance at a cost of two pointers in every subclass vtable. Change-Id: Ied4f91d4d203b5e6d83abe751159eb7e55489bb5 Reviewed-on: https://pdfium-review.googlesource.com/38530 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxjs/cfxjse_formcalc_context.h')
-rw-r--r--fxjs/cfxjse_formcalc_context.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fxjs/cfxjse_formcalc_context.h b/fxjs/cfxjse_formcalc_context.h
index 052bba394a..8a92d9b0f1 100644
--- a/fxjs/cfxjse_formcalc_context.h
+++ b/fxjs/cfxjse_formcalc_context.h
@@ -25,6 +25,9 @@ class CFXJSE_FormCalcContext : public CFXJSE_HostObject {
CXFA_Document* pDoc);
~CFXJSE_FormCalcContext() override;
+ // CFXJSE_HostObject:
+ CFXJSE_FormCalcContext* AsFormCalcContext() override;
+
static void Abs(CFXJSE_Value* pThis,
const ByteStringView& szFuncName,
CFXJSE_Arguments& args);