Age | Commit message (Collapse) | Author |
|
Isolates are long-lived, but this may catch a few things.
Introduce CFX_V8IsolateDeleter for unique_ptr<v8::Isolate> usage.
Fix Dispose()/SetIsolate(nullptr) ordering in cjs_runtime.cpp
Remove one unused isolate member.
Flip protected -> private in one place.
Change-Id: I26cdd120f799192e93b0d9d04dcde8f348dc21f3
Reviewed-on: https://pdfium-review.googlesource.com/37931
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
|
|
The non-Maybe versions will soon be deprecated.
Where the code was already handling failures, I did the same; where the
code was not handling failures, I inserted ToLocalChecked() calls. Thus
the behavior before and after this patch should be the same.
For consistency, also updated the use of v8::Function::Call
in CFXJSE_Context::ExecuteScript() to the Maybe version, so
that all code in that function now branches on the non-emptyness
of MaybeLocals, rather than TryCatch::HasCaught(). ASSERTs were
inserted to sanity-check the API usage.
Bug: v8:7269, v8:7273, v8:7274
Change-Id: I59696e63a64a233a9f9c2b72c621a05b5e349a31
Reviewed-on: https://pdfium-review.googlesource.com/23270
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
|
|
The non-Isolate version will soon be deprecated.
Bug: v8:7269, v8:7282
Change-Id: I204e45bd73f5b809d6c44b77bbcf62d32e7ccbec
Reviewed-on: https://pdfium-review.googlesource.com/23058
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
|
|
Change-Id: I182388970e422bd31d011628a4f1b905d12b0da0
Reviewed-on: https://pdfium-review.googlesource.com/20193
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
|
|
All of the callers to SetObject pass in the class so we can remove the
class check. The SetJSObject method is no longer needed. The
SetHostObject method has been merged into the SetObject method.
Change-Id: Id80931b88cc0656d021350ea8d62369513b86b9d
Reviewed-on: https://pdfium-review.googlesource.com/17858
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
Automated using git grep & sed.
Replace StringC classes with StringView classes.
Remove the CFX_ prefix and put string classes in fxcrt namespace.
Change AsStringC() to AsStringView().
Rename tests from TEST(fxcrt, *String*Foo) to TEST(*String*,
Foo).
Couple of tests needed to have their names regularlized.
BUG=pdfium:894
Change-Id: I7ca038685c8d803795f3ed02545124f7a224c83d
Reviewed-on: https://pdfium-review.googlesource.com/14151
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
|
|
Since there is no guarantee of termination if the StringC was
extracted from a snippet of another string. Make it more obvious
that things like
strlen(str.unterminated_c_str())
might be a bad idea.
Change-Id: I7832248ed89ebbddf5c0bcd402aac7d40ec2adc2
Reviewed-on: https://pdfium-review.googlesource.com/8170
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
|
|
Change-Id: I158b7d80b0ec28b742a9f2d5a96f3dde7fb3ab56
Reviewed-on: https://pdfium-review.googlesource.com/3031
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
|
|
This CL removes the use of FX_Alloc and any remaining new'd CFXJSE_Value objects
from CXFA_FM2JSContext and replaces them with unique_ptrs and vectors.
Change-Id: I30ba697d65ee326d2faa895c3217bdc407419298
Reviewed-on: https://pdfium-review.googlesource.com/2157
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
|
|
FX_BOOL was a type just like a regular C++ bool, except that it
took 4x the space and frequently was used to hold values besides
true or false.
Review-Url: https://codereview.chromium.org/2471353002
|
|
BUG=pdfium:611
Review-Url: https://codereview.chromium.org/2380713005
|
|
This Cl moves the fxjse/ directory to fxjs/ in anticipation of merging in
fpdfsdk/jsapi. In the process the filenames are updated to better match the
class contents. Static methods are moved to anonymous namespaces as possible.
Review-Url: https://codereview.chromium.org/2136213002
|