summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-09-18Change signature of FPDFPageObjMark_Get(Name|ParamKey).chromium/3556Henrique Nakashima
These methods used to return the size of the buffer to contain the value to be returned. Now they will return an FPDF_BOOL to make it consistent with the other mark APIs and more intuitive to differentiate a success from a failure. The size will be returned through an out param. This CL also adds more focused testing for these API methods and similar ones. Change-Id: I6f9837f99d955aaba2c49a259ed7805a286e091d Reviewed-on: https://pdfium-review.googlesource.com/42411 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-18Transfer ownership of nodes to top-level XML docRyan Harrison
For XFA, XML nodes are owned by the XML doc that they were created by, but references to them are stored elsewhere. For a PDF document there is one top-level XML document created and retained when the initial XFA XML is parsed. Another can be created if loadXML is called by JS. In the existing code the XML doc that owns the newly created nodes is local to loadXML. So the nodes are destroyed right after putting refernces to them into the main XFA data structures. This CL adds in a method to transfer ownership of the XML nodes from one doc to another, and uses it to correctly retain the newly created nodes, by having them owned by the top-level XML doc. BUG=chromium:884664 Change-Id: Id29b4edbfe44aefb9713328e4e217e830f7e9e14 Reviewed-on: https://pdfium-review.googlesource.com/42690 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2018-09-18Encode mark names when writing to file.Henrique Nakashima
Bug: pdfium:1150 Change-Id: I7e589fb3d164dfc9b39a7a3f6e782c09331cc32d Reviewed-on: https://pdfium-review.googlesource.com/42630 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-09-18Roll third_party/freetype/src/ f8af8fba7..dfddc2d97 (14 commits)Lei Zhang
https://chromium.googlesource.com/chromium/src/third_party/freetype2.git/+log/f8af8fba78ac..dfddc2d97596 Created with: roll-dep third_party/freetype/src BUG=pdfium:1153 TBR=npm@chromium.org Change-Id: Ia1359184f0290cd0a04487a50e43b61c5971ab30 Reviewed-on: https://pdfium-review.googlesource.com/42671 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Make fxcrt::Retainable non-copyable.Tom Sepez
Because copying ref-counts from one object to another is a bad idea and sure to leak. Change-Id: I5f2c0891d08c893eb1ac8fb8a5908d975295ae2e Reviewed-on: https://pdfium-review.googlesource.com/42670 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-17Check for empty streams earlier in CPDF_StreamAcc::LoadAllData().Lei Zhang
Change-Id: I91c8d7d837e4c2104d56d725c16a28d49399aaca Reviewed-on: https://pdfium-review.googlesource.com/42592 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-17Replace CJS_GlobalVariableArray::Copy() with operator=().Tom Sepez
Change-Id: I71794f87a99f9dcbb04296f42e8a5cd55656bd90 Reviewed-on: https://pdfium-review.googlesource.com/42615 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-17Make CBC_CodeBase::SetWideNarrowRatio() not virtual.Lei Zhang
Make CBC_Writer::SetWideNarrowRatio() virtual instead. Do the same for SetStartChar(), SetEndChar(), and SetErrorCorrectionLevel(). Change-Id: I70e87c0e9f8b772331105e57dd26075db3cfcb95 Reviewed-on: https://pdfium-review.googlesource.com/42602 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-17Extract duplicate code into GetShadingSteps().Lei Zhang
Change-Id: I6761a5f7fc099807c09abacdccbb72d282252551 Reviewed-on: https://pdfium-review.googlesource.com/42604 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-17Remove a check that is never true in CJBig2_ArithDecoder::Decode().chromium/3555Lei Zhang
Change-Id: I538fd8bf9905be61d2297181bd02a243a01b30db Reviewed-on: https://pdfium-review.googlesource.com/42607 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-17Use more booleans within JBig2ArithCtx.Lei Zhang
Change-Id: I41535238715926795f5c588dcae0834bf3a789d0 Reviewed-on: https://pdfium-review.googlesource.com/42606 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-17Remove CPDF_StreamAcc::m_pSrcData.Lei Zhang
It just ends up being a nullptr, so it is not useful. Change-Id: I52fcbb261c4bb0bc024e1856da95028431d577c1 Reviewed-on: https://pdfium-review.googlesource.com/42591 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-17Make CBC_CodeBase::SetTextLocation() not virtual.Lei Zhang
Make CBC_Writer::SetTextLocation() virtual instead. Change-Id: I9ac06affe35f3c7bebc2f5ff0917e7146cfe89cc Reviewed-on: https://pdfium-review.googlesource.com/42601 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-17Make JBig2ArithCtx a class.Lei Zhang
For better encapsulation. Change-Id: Ia6fd8056112d97d672b91a9a521a2978c807060f Reviewed-on: https://pdfium-review.googlesource.com/42605 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Fix final/protected conflicts.Tom Sepez
Classes marked |final| should not have |protected| members. In turn, "private field m_dwEncryptObjNum is not used" warning is produced. Change-Id: I51a96aca5a5f499381a6764d892962f7f2dc0327 Reviewed-on: https://pdfium-review.googlesource.com/42611 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-17Make CBC_CodeBase::SetTextLocation() virtual.Lei Zhang
Do the same for a few other CBC_CodeBase methods, instead of trying to implement virtual methods manually using memory pointers. Change-Id: Iec0e3a4f8eabc54962c7ac0a00a1b80b192ff474 Reviewed-on: https://pdfium-review.googlesource.com/42600 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Initialize some 1D barcode classes in the header.Lei Zhang
Change-Id: Iaeb7f43e442ace403f1522268e63b1a59f223a9d Reviewed-on: https://pdfium-review.googlesource.com/42599 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Remove BCExceptionInvalidateCharacter.Lei Zhang
Change-Id: Ia165095864ffe2865a5e433d09d0bccad1164d2c Reviewed-on: https://pdfium-review.googlesource.com/42453 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Encapsulate CPDF_StreamAcc::LoadAllData().Lei Zhang
Make it a private method, and add public methods so only limited combinations of LoadAllData() arguments are possible. Change-Id: I8c2220eb0e95012350858876586f7c470c40a7c3 Reviewed-on: https://pdfium-review.googlesource.com/42590 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-17Remove deprecated FPDFPage_CountObject().Lei Zhang
FPDFPage_CountObjects() is the straight-forward replacement that has been available for a year. Change-Id: I64cd379f81234d8295bfcaf9b6effe3467f100d6 Reviewed-on: https://pdfium-review.googlesource.com/42451 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Roll v8/ 19afaa143..41562c7c5 (415 commits)chromium/3554Lei Zhang
https://chromium.googlesource.com/v8/v8.git/+log/19afaa1436ef..41562c7c52bd Created with: roll-dep v8 TBR=hnakashima@chromium.org Change-Id: I210263c82dfa3c8d341069975a07368535d9592e Reviewed-on: https://pdfium-review.googlesource.com/42598 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Roll tools/clang to 9bd40b25b.Lei Zhang
Need to roll build/ to match. https://chromium.googlesource.com/chromium/src/tools/clang/+log/13b165992adf..9bd40b25b05f https://chromium.googlesource.com/chromium/src/build.git/+log/4755315a..f53effa7 TBR=hnakashima@chromium.org Change-Id: Ib819c1ea1375a9af61b4ba3a0d38261539475c9a Reviewed-on: https://pdfium-review.googlesource.com/42597 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-15Roll third_party/libjpeg_turbo/ 7260e4d8b..61a2bbaa9 (4 commits)Lei Zhang
https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git/+log/7260e4d8b8e1..61a2bbaa9aec Created with: roll-dep third_party/libjpeg_turbo TBR=hnakashima@chromium.org Change-Id: I72dc2838e650f849e52900c3666ef7ac9d0b436a Reviewed-on: https://pdfium-review.googlesource.com/42596 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Roll DEPS for catapult to 9f36d9f7Lei Zhang
https://chromium.googlesource.com/external/github.com/catapult-project/catapult.git/+log/c61a0380..9f36d9f7 TBR=hnakashima@chromium.org Change-Id: Id5bd0cd43aa355a5cd35838e252828bec321ac86 Reviewed-on: https://pdfium-review.googlesource.com/42595 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Remove FXFM_ENCODING_NONE.Lei Zhang
FX_CreateFontEncodingEx() always passes FXFM_ENCODING_NONE. Just get rid of it instead. Change-Id: I417f84d8ae2f10ba874265a92576d3ef8481a9d6 Reviewed-on: https://pdfium-review.googlesource.com/42460 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Remove dead CBC_QRCoderEncoder code.Lei Zhang
Change-Id: I096ba8681d779bb0cc1d7aaaedcd9f68020d5b37 Reviewed-on: https://pdfium-review.googlesource.com/42452 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-15Use ScopedFPDFStructTree in tests.Lei Zhang
Change-Id: Ia457942238ca2a9f48210c080a93412c09ae932c Reviewed-on: https://pdfium-review.googlesource.com/42570 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Use pdfium::Optional in CFGAS_GEFont.Lei Zhang
Change-Id: I1fe90d94ed782f59745dc47e38cda561c5b5ac47 Reviewed-on: https://pdfium-review.googlesource.com/42512 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Add CPDF_Document::StockFontClearer.Lei Zhang
So CPDF_Document's dtor does not have to do any explicit cleanup. Change-Id: Iaec7d18f67422914542fc1dc5f3b1b5a9cf5ffc5 Reviewed-on: https://pdfium-review.googlesource.com/42551 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-14Use MakeUnique() in CFFL_InteractiveFormFiller.Tom Sepez
Remove more bare |new|s. Change-Id: Ia26bb8150d5bb0004c6a8e6ff89b4694b9ef2865 Reviewed-on: https://pdfium-review.googlesource.com/42552 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Use unique_ptr<> in CJS_GlobalVariableArray::Add().Tom Sepez
Clean up another ten bare |new|s or so. Change-Id: If32b307e5edd844488dfb2020e710214bb6f75a0 Reviewed-on: https://pdfium-review.googlesource.com/42550 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Use fxcrt::MaybeOwned in CFGAS_GEFont.Lei Zhang
Change-Id: Ie1f4763e37832475a60c55b26263405e0bbf09b3 Reviewed-on: https://pdfium-review.googlesource.com/42510 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-14Use UnownedPtr in CFX_UnicodeEncoding.Lei Zhang
Change-Id: I410909be359a5b5bb0c90d42064144771183525e Reviewed-on: https://pdfium-review.googlesource.com/42461 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Revert "Disable FPDFEditEmbeddertest.AddCIDFontText"Tom Sepez
This reverts commit 725f544776a6ee96a514a91dffd39aa32ecca3e6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Disable FPDFEditEmbeddertest.AddCIDFontText > > Bug: pdfium:1151 > Change-Id: Ib8b0f8165389ce1a1aa96652685dab14eac6bdfd > Reviewed-on: https://pdfium-review.googlesource.com/42412 > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: I8a27fe9c5d678f6a041542f3be3a3bade857753a No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: pdfium:1151 Reviewed-on: https://pdfium-review.googlesource.com/42530 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Clean up CFGAS_GEFont members.Lei Zhang
Remove unused members and initialize the rest in the header. Change-Id: Ic2122fc1d49024632b9ebd4cb490c14dd0724de6 Reviewed-on: https://pdfium-review.googlesource.com/42491 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Change two memcpys to iterator form of vector constructor.Tom Sepez
Because bytestring supports standard iterators. Change-Id: Iaa33d79dbbf07d660eee1dd95d9f5f15547fb57c Reviewed-on: https://pdfium-review.googlesource.com/42511 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Rename FPDF_RenderPage_Retail() to RenderPageWithContext()chromium/3553Tom Sepez
Removing the FPDF_ prefix also makes it more obvious that this is not a public/ entry point. No functional changes. Bug: pdfium:1149 Change-Id: I6d68d7951cbfc65128339e237017e7b4bc965635 Reviewed-on: https://pdfium-review.googlesource.com/42490 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Make ContentParam::m_Name be a ByteString.Tom Sepez
Currently this is an inline fixed-length char[] buffer. We make a byte string out of this in many places, and the current implementation still memcpy's, so the additional costs should be minimal. Next, we can avoid special-casing names that are longer than the fixed size. Change-Id: I980463cbb2325a9d6080bb51a6dfb0dbd1b704b1 Reviewed-on: https://pdfium-review.googlesource.com/42430 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-14Initialize CBC_OneDimWriter members in the header.Lei Zhang
Rearrange them as well. Change-Id: I8653004cd06a4054e32d0148adc1400029ceb34e Reviewed-on: https://pdfium-review.googlesource.com/42459 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-09-14Add basic tests for some annotation APIs.Lei Zhang
Make sure they can handle obviously bad input. These cases lack test coverage. Change-Id: I32d3345faebe566e5346750f622f6be9409f30e4 Reviewed-on: https://pdfium-review.googlesource.com/42450 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2018-09-13Use safe math in MatchFloatRange().Tom Sepez
Bug: 882959 Change-Id: I3ce17916da1346158dbf5282be6696879a22567a Reviewed-on: https://pdfium-review.googlesource.com/42355 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Reland "Introduce FX_Number class as a replacement for FX_atonum()."Tom Sepez
This reverts commit 29e180342e18873babf1c74f7c5c056f90a191b0. Reason for revert: probably harmless Original change's description: > Revert "Introduce FX_Number class as a replacement for FX_atonum()." > > This reverts commit a5d7ad3aa8feb08a14b5cca173d673054c1ade23. > > Reason for revert: Speculative revert to get back before flake. > > Original change's description: > > Introduce FX_Number class as a replacement for FX_atonum(). > > > > The issue with FX_atonum() is that it doesn't return any information > > about whether it range-checked its integer values as a signed or > > unsigned type, even though it knows this as part of its processing. > > > > Rather than adding another out parameter to that function, create > > a class to hold all this information together. > > > > This is the first place things went astray while diagnosing > > bug 882959, in that a large positive value was cast to float as a > > negative value. Unfortunately, this doesn't affect the related bug, > > but is a step in the right direction. > > > > Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c > > Reviewed-on: https://pdfium-review.googlesource.com/42353 > > Reviewed-by: Lei Zhang <thestig@chromium.org> > > Commit-Queue: Tom Sepez <tsepez@chromium.org> > > TBR=thestig@chromium.org,tsepez@chromium.org > > Change-Id: Ia56270c3daa80408fc2b23eb4384a77f03f45b82 > Reviewed-on: https://pdfium-review.googlesource.com/42392 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org Change-Id: I83c37aa3040a8890f2117753f19ab1d452d411e7 Reviewed-on: https://pdfium-review.googlesource.com/42410 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
2018-09-13Disable FPDFEditEmbeddertest.AddCIDFontTextTom Sepez
Bug: pdfium:1151 Change-Id: Ib8b0f8165389ce1a1aa96652685dab14eac6bdfd Reviewed-on: https://pdfium-review.googlesource.com/42412 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Reland "Make things more const-y"chromium/3552Tom Sepez
This reverts commit 5700d9e2eea5813861920995815ac092fd7df973. Reason for revert: Harmless, I think. Original change's description: > Revert "Make things more const-y" > > This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95. > > Reason for revert: Rule out that this be making embeddertest flakey. > Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ??? > > Original change's description: > > Make things more const-y > > > > Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 > > to use const more in the changed code. > > > > BUG=chromium:881678 > > > > Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 > > Reviewed-on: https://pdfium-review.googlesource.com/42370 > > Commit-Queue: Ryan Harrison <rharrison@chromium.org> > > Reviewed-by: Lei Zhang <thestig@chromium.org> > > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> > > TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org > > Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4 > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: chromium:881678 > Reviewed-on: https://pdfium-review.googlesource.com/42372 > Reviewed-by: Tom Sepez <tsepez@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: I24de62969b039288596aa4d0b268ad49728e4891 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:881678 Reviewed-on: https://pdfium-review.googlesource.com/42393 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Revert "Introduce FX_Number class as a replacement for FX_atonum()."Tom Sepez
This reverts commit a5d7ad3aa8feb08a14b5cca173d673054c1ade23. Reason for revert: Speculative revert to get back before flake. Original change's description: > Introduce FX_Number class as a replacement for FX_atonum(). > > The issue with FX_atonum() is that it doesn't return any information > about whether it range-checked its integer values as a signed or > unsigned type, even though it knows this as part of its processing. > > Rather than adding another out parameter to that function, create > a class to hold all this information together. > > This is the first place things went astray while diagnosing > bug 882959, in that a large positive value was cast to float as a > negative value. Unfortunately, this doesn't affect the related bug, > but is a step in the right direction. > > Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c > Reviewed-on: https://pdfium-review.googlesource.com/42353 > Reviewed-by: Lei Zhang <thestig@chromium.org> > Commit-Queue: Tom Sepez <tsepez@chromium.org> TBR=thestig@chromium.org,tsepez@chromium.org Change-Id: Ia56270c3daa80408fc2b23eb4384a77f03f45b82 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://pdfium-review.googlesource.com/42392 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Revert "Make things more const-y"Tom Sepez
This reverts commit 882ed81dec7afc5bc106f965af34f1e59407fd95. Reason for revert: Rule out that this be making embeddertest flakey. Seems improbable, but maybe the const is allowing the compiler to use stale data in a non-logically const operation ??? Original change's description: > Make things more const-y > > Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 > to use const more in the changed code. > > BUG=chromium:881678 > > Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 > Reviewed-on: https://pdfium-review.googlesource.com/42370 > Commit-Queue: Ryan Harrison <rharrison@chromium.org> > Reviewed-by: Lei Zhang <thestig@chromium.org> > Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> TBR=thestig@chromium.org,hnakashima@chromium.org,rharrison@chromium.org Change-Id: Ifee656f151d3e6dab6de33c3b96b37b9809004c4 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: chromium:881678 Reviewed-on: https://pdfium-review.googlesource.com/42372 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Test that FX_TryRealloc failure leaves original contents intactTom Sepez
Change-Id: I2b1e5cc7a9576b5bb3bf3888225d1f6e54e0c95b Reviewed-on: https://pdfium-review.googlesource.com/42051 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
2018-09-13Make things more const-yRyan Harrison
Follow up to https://pdfium-review.googlesource.com/c/pdfium/+/42350 to use const more in the changed code. BUG=chromium:881678 Change-Id: I7a88862952c9ba25ffa89c2827e1de322f3b5c33 Reviewed-on: https://pdfium-review.googlesource.com/42370 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
2018-09-13Introduce FX_Number class as a replacement for FX_atonum().Tom Sepez
The issue with FX_atonum() is that it doesn't return any information about whether it range-checked its integer values as a signed or unsigned type, even though it knows this as part of its processing. Rather than adding another out parameter to that function, create a class to hold all this information together. This is the first place things went astray while diagnosing bug 882959, in that a large positive value was cast to float as a negative value. Unfortunately, this doesn't affect the related bug, but is a step in the right direction. Change-Id: I0977ec8fccf85e2632a962507bdd30a1cbe6d33c Reviewed-on: https://pdfium-review.googlesource.com/42353 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
2018-09-13Remove cq_name from cq.cfg.Lei Zhang
LUCI rejected a recent cq.cfg update because the pre-existing config had this error: "cq.cfg: cq_name is no longer used and can and should be removed." TBR=nodir@chromium.org Change-Id: I4b4e2bb9ed39896fa091d3fec929443417c0e8f3 Reviewed-on: https://pdfium-review.googlesource.com/42371 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>