Age | Commit message (Collapse) | Author |
|
This reverts commit 5a256ad29483eb2b13e6e2c89fe0f77a9103f68f.
Reason for revert: broke JS tests.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1112673002
|
|
Then remove CFX_{Wide,Byte}String::LockBuffer(). Prelude to a vast
simplification. There's an additional copy now in one place, so
shoot me.
BUG=pdfium:144
R=thestig@chromium.org
Committed: https://pdfium.googlesource.com/pdfium/+/ee7412f5aef353e5c6f1a64d0e1708ed926869d9
Review URL: https://codereview.chromium.org/1053613004
|
|
This reverts commit ee7412f5aef353e5c6f1a64d0e1708ed926869d9.
Reason for revert: VS compile broke.
TBR=thestig@chromium.org
Review URL: https://codereview.chromium.org/1106333003
|
|
Then remove CFX_{Wide,Byte}String::LockBuffer(). Prelude to a vast
simplification. There's an additional copy now in one place, so
shoot me.
BUG=pdfium:144
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1053613004
|
|
Failure to check document-controlled value before using it.
BUG=481363
R=palmer@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1110653002
|
|
Carry-on from https://codereview.chromium.org/1108903002/
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1103343002
|
|
This involves adding some explicit c_str() calls. Doing so flagged
PDF_EncodeText() and FindOptionValue() as having suboptimal signatures, in
that we are often throwing away a perfectly fine length and recomputing it.
There are still some platform-specific code that needs the operator.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1101933003
|
|
This reverts commit 15a62973b9b89c3e229cc0ab501c45967f91b325.
Reason for revert: broke build on windows, mac. I must have missed
some platform-specific conversions.
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1108883002
|
|
This involves adding some explicit c_str() calls. Doing so flagged
PDF_EncodeText() and FindOptionValue() as having suboptimal signatures, in
that we are often throwing away a perfectly fine length and recomputing it.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1101933003
|
|
The code to validate the number of parameters happens inside each particular
method, rather than prior to method dispatch. As such, there's no point in
having this number take up space in the table.
Add some test to cover at least some of the per-method validations, and
update error messages to be more useful.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1084183008
|
|
The red-flag here is the explicit invocation of things like
params[1].operator CFX_WideString()
rather than
static_cast<CFX_WideString>(params[1])
to invoke the conversion. Turns out the above won't compile due to
ambiguity given the number of implicit constructors for widestrings.
CJS_Value has both constructors and assignment operators for the
primitive types, which means that conversions can take place
unexpectedly in both directions, a second red flag.
We don't want the compiler invoking these at will since it may hide
bugs. In fact, when they are removed, three such places were
discovered.
Also rename ToJSValue to ToV8Value to match the other ToV8xxxxx
functions added.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1096813008
|
|
BUG=467392
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1064713008
|
|
Part 2 of 4.
R=thestig@chromium.org
TBR=brucedawson@chromium.org
BUG=pdfium:142
Review URL: https://codereview.chromium.org/1099193002
|
|
Removing the implicit cast operator forces a build breakage should we
use ByteStringC in STL containers. Adding an operator< restores correct
behaviour. Adding an operator[] avoids re-writing some code to call
GetPtr() prior to array indexing.
Part 1 of 4.
R=thestig@chromium.org
TBR=brucedawson@chromium.org
BUG=pdfium:142.
Review URL: https://codereview.chromium.org/1090303003
|
|
Part 4 of 4.
BUG=pdfium:142
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1084293003
|
|
Part 3 of 4.
BUG=pdfium:142
R=brucedawson@chromium.org, thestig@chromium.org
Review URL: https://codereview.chromium.org/1099213002
|
|
This regressed in commit 3f41851 due to shadow variables.
BUG=478164
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1101443004
|
|
It's unused.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1098203002
|
|
BUG=453553
R=thestig@chromium.org, tsepez@chromium.org
Review URL: https://codereview.chromium.org/1093323003
|
|
Also delete unused CFFL_Edit_UndoItem class.
BUG=https://code.google.com/p/pdfium/issues/detail?id=140
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1098043002
|
|
Also remove virtual methods, since this is neither subclassed nor a
subclass.
BUG=https://code.google.com/p/pdfium/issues/detail?id=140
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1097843003
|
|
BUG=pdfium:140
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1093213002
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1096853002
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1084613006
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1089823004
|
|
This can't change for the life of the object, so tidy up some wild uses
throughout the code. Also kill pointless Initialize() method.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1060813003
|
|
This is a copy of breakpad's standalone scoped_ptr, which has been
renamed to nonstd::unique_ptr, and from which more complicated classes
have been removed. The reset() method has also been tweaked to more
closely match c++11, and an implicit conversion to bool has been added.
BUG=https://code.google.com/p/pdfium/issues/detail?id=55
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1091283002
|
|
- Check bounds when accessing array.
- Remove potential memory leak.
- Merge duplicate code.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1094763002
|
|
Very few places where a change is required, but remove FX_NEW to show
they've been audited.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1075953004
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1085363003
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1084303002
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1090693002
|
|
Code might someday be made clean for -Wmissing-field-initializers
and -Wsign-compare, but for now this produces too much noise to be
useful.
The -Wmissing-field-initializers warning is misguided in a high
percentage of cases, and actually leads to bad fixes.
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1094713002
|
|
This change disables several warnings that fire frequently
in pdfium and are not practical to fix at this time.
R=tsepez@chromium.org
BUG=440500
Review URL: https://codereview.chromium.org/1096463005
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1062863006
|
|
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1081443004
|
|
Replace them with |new| so that we can tell by the presence of FX_NEW
the places that still need to be audited.
R=thestig@google.com, thestig@chromium.org
Review URL: https://codereview.chromium.org/1052553006
|
|
BUG=380476
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1061013003
|
|
The source files required to use the NEON function are not
included so we should not try to reference those symbols.
BUG=477162
TEST=ninja -C out_arm/Release/ pdfium_diff
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1085023003
|
|
Restores default behavior of new.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1082253003
|
|
Note: Landed on XFA first by mistake.
Original review: https://codereview.chromium.org/1085963002/
TBR=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1090463002
|
|
CFX_Object is a type that implements its own new operators that return
NULL on error. There's no need for this given the |new (std::nothrow)|
syntax; in fact, the current code can only work if there is no activity
in the constructors. This may explain the pervasive lack of
constructors and reliance on Init() methods throughout the codebase.
The activity takes place in fx_memory.h, where FX_NEW is mapped onto
the std::nothrow syntax. The rest is just cleanup.
Down the road, we will simply throw and remove all the error-checking
paths for new objects. Landing this patch first will at least show a
simple path back to the old behaviour without having to re-introduce
CFX_Object should someone want to do so in their own fork.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1088733002
|
|
BUG=476107
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1080893002
|
|
TBR=tsepez@chromium.org
BUG=N/A
Review URL: https://codereview.chromium.org/1081663002
|
|
Add a check to make sure offset is less than the size of string in the function of GetNextChar().
BUG=471651
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1067073003
|
|
Three functions in fx_coordinates.h account for 60% of the warnings
when building with VS 2015, due to variable shadowing. Renaming the
function parameters is safe, resolves the warnings, and reduces
confusion.
R=tsepez@chromium.org
BUG=440500
Review URL: https://codereview.chromium.org/1077083003
|
|
Replaces https://codereview.chromium.org/1062983002/
BUG=469244
R=brucedawson@chromium.org
Review URL: https://codereview.chromium.org/1077903002
|
|
A stack overflow was triggered by checked_cast due to
invalid index in pdf files like 'Index[45 -1661]'.
BUG=473400
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1054303005
|
|
The initialization sequence becomes more complicated as v8 evolves
and when we move to XFA (where pdfium_unittests are currently broken).
Centralize this initialization in a few places, like the embedder_test
framework and the pdfium_test binary, and convert tests that require
it into embedder_tests rather than unit_tests.
Change on master first before moving to XFA.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1071343002
|
|
Also update build files to deal with the new revision. The main issue
is the external startup files for v8. The default is not to use them
(simpler for standalone users to deploy), but can be built either way.
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1059023003
|