diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-10-26 11:00:51 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-10-26 15:16:56 +0000 |
commit | efc879d226e98ddad36704d78f52037ccf4369dc (patch) | |
tree | 50e4510a0ff984d339b08a7a5ea4a26fa90926db /xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp | |
parent | 78b334a824c42138f5e98060638b1643b0279602 (diff) | |
download | pdfium-efc879d226e98ddad36704d78f52037ccf4369dc.tar.xz |
Consistently apply JS size check
This CL makes the use of CXFA_IsTooBig consistent and universal across
all of the ToJavascript and related methods. Previously this method
was only applied in some calls. It is now being tested as a
precondition and postcondition on every call and as a post condition
for the entire translation process.
There are some size checks within methods that potentially generate
large amounts of JS that have been left in.
BUG=chromium:752920
Change-Id: I1a8bfe21e0a17c2e47592fc6017060243674f1bc
Reviewed-on: https://pdfium-review.googlesource.com/16812
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp')
-rw-r--r-- | xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp index 8c2aeefbbd..2f271d8c60 100644 --- a/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp +++ b/xfa/fxfa/fm2js/cxfa_fm2jscontext.cpp @@ -6087,7 +6087,8 @@ bool CXFA_FM2JSContext::Translate(const WideStringView& wsFormcalc, return false; wsJavascript->AppendChar(0); - return true; + + return !CXFA_IsTooBig(*wsJavascript); } CXFA_FM2JSContext::CXFA_FM2JSContext(v8::Isolate* pScriptIsolate, |