summaryrefslogtreecommitdiff
path: root/fpdfsdk/include/javascript/JS_Define.h
AgeCommit message (Collapse)Author
2015-08-04Merge to XFA: Remove stringify macro (#) from JS_STATIC_CONST_ENTRY_*.Tom Sepez
(cherry picked from commit d539de991cacf02811880c434d4393c8275163d2) Original Review URL: https://codereview.chromium.org/1256283005 . R=thestig@chromium.org TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1272043002 .
2015-08-04XFA: clang-format all pdfium code.Nico Weber
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
2015-07-22Merge to XFA: Remove dead code found by Scythe.Lei Zhang
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1249643003 . (cherry picked from commit b05f1fd710496dea44b001bb905fa1c16a39bb28) Review URL: https://codereview.chromium.org/1250433003 .
2015-06-13Remove trailing whitespaces in fpdfsdk, XFA edition.Lei Zhang
Review URL: https://codereview.chromium.org/1185843005.
2015-06-09Merge to XFA: Use stdint.h types throughout PDFium.Tom Sepez
Near-automatic merge, plus re-running scripts to update additional usage. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1172793002
2015-05-28Merge to XFA: Fix ALL the include guards.Tom Sepez
Original Review URL: https://codereview.chromium.org/1160443004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1162013003
2015-05-19Merge V8 API updates to xfa branchJochen Eisinger
Set pointers in internal fields directly instead of wrapping them Review URL: https://codereview.chromium.org/1139853003 Use phantom handles instead of weak handles Review URL: https://codereview.chromium.org/1129253004 Replace deprecated with non-deprecated V8 APIs Review URL: https://codereview.chromium.org/1126203010 Add myself to OWNERS file Review URL: https://codereview.chromium.org/1133333005 Replace v8::Handle with v8::Local and v8::Persistent with v8::Global Review URL: https://codereview.chromium.org/1138823004 TBR=tsepez@chromium.org BUG= Review URL: https://codereview.chromium.org/1140033004
2015-04-23Merge to XFA: Remove unused nParamNum values from JS method tables.Tom Sepez
Original Review URL: https://codereview.chromium.org/1084183008 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1105813002
2015-04-23Merge to XFA: Kill overloaded cast operators in CJS_Value.Tom Sepez
Original Review URL: https://codereview.chromium.org/1096813008 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1106663002
2015-04-07Merge to XFA: Fix (nearly all) IWYU in fpdfskd/include/javascript/ headers.Tom Sepez
Original Review URL: https://codereview.chromium.org/1060133002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/1065103002
2015-03-02Merge to XFA: Kill off JS_ErrorString type.Tom Sepez
Orignal Review URL: https://codereview.chromium.org/971033002 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/969203002
2015-03-02Merge to XFA: Return error information from pdfium to JS.Tom Sepez
Cherry-pick from b720d0a14601f1496ef15297bc46d401f5a2a890 + Manually resolve merge conflicts + Fix more IWYU to fix compile. Original Review URL: https://codereview.chromium.org/963193003 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/971013002
2015-02-25Merge to XFA: Kill off unused IFXJS interface methods.Tom Sepez
Original Review URL: https://codereview.chromium.org/954923004 TBR=thestig@chromium.org Review URL: https://codereview.chromium.org/952213004
2015-02-23Merge to XFA: Replace second set of #defines with templates in JS_Define.hTom Sepez
Original Review URL: https://codereview.chromium.org/945623002 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/948083002
2015-02-19Merge to XFA: Replace ugly JS_Define macros with templates.Tom Sepez
Original Review URL: https://codereview.chromium.org/908033002 R=brucedawson@chromium.org Review URL: https://codereview.chromium.org/932223002
2015-02-17Merge to XFA: Tidy up JS_Defines.hTom Sepez
Original Review URL: https://codereview.chromium.org/927263003 TBR=brucedawson@chromium.org Review URL: https://codereview.chromium.org/936613002
2015-01-05XFA: merge patch from CL 729293003, use FX_ArraySize for safetyBruce Dawson
Note that the merge of this fix to XFA found six bugs. Five were fixed in https://codereview.chromium.org/826573003 and one was fixed in https://codereview.chromium.org/831293002. These bugs are now impossible to compile. Replace manual/error-prone/hard-to-verify arraysize calculations with safe FX_ArraySize macro. pdfium has numerous places where the number of elements in an array is calculated with expressions like: sizeof(cFormats)/sizeof(FX_LPCWSTR) This is suboptimal because it is verbose, it is easy to get wrong, and it cannot be determined through casual inspection whether the code is correct. It will give incorrect results if cFormats is a pointer instead of an array and it will give incorrect results if FX_LPCWSTR is not the type of the array elements. The FX_WSTRC macro in fx_string.h which I fixed was particularly scary because it would silently misbehave if passed a pointer. The FX_ArraySize macro which I have added and started using (taken from arraysize in v8's macros.h) is easier to use and will always give correct results. If passed a pointer it will fail to compile. For this change I only fixed instances of sizeof(FX_LPCWSTR). There appear to be about 150 other places in the pdfium code that could benefit from using FX_ArraySize. TBR=bo_xu@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/818193004
2014-12-23XFA: merge patch from CL 733693003, getting rid of more castsBruce Dawson
Getting rid of more (FX_LPCWSTR) casts and fixing two bugs revealed by this. Since casts to FX_LPCWSTR have been shown to hide bugs I tried removing more of them, targeting those places where a cast was used to force a conversion from CFX_WideString to FX_LPCWSTR, replacing these casts with calls to the newly added .c_str() function. This revealed two places where the cast was hiding a bug -- where ->c_str() was required instead! This removes ~33 FX_LPCWSTR casts and there are ~31 left, many of which will go away in some future change. Also includes this change: Removing unnecessary casts from wchar_t* to wchar_t*, by various names. Original patch from Bruce Dawson(brucedawson@chromium.org) TBR=bo_xu@foxitsoftware.com, tsepez@chromium.org Review URL: https://codereview.chromium.org/811593007
2014-12-19XFA: merge patch from CL 441988Bruce Dawson
Avoid duplicate definitions of JSCONST_n*Hash and QeTable variables. QeTable is a 752 byte array that was defined in a header file. This caused it to be instantiated by the VC++ compiler 12 times, wasting 8,272 bytes of space in the data segment. Because 'const' implies 'static' this did not cause any duplicate symbol errors. JSCONST_n*HASH are a set of eight variables that are defined in a header file. This causes them to be replicated 15 times. The variables themselves are tiny but they are dynamically initialized and this dynamic initialization code is replicated 15 times. When tested on pdfium_test.exe the effect of this change is to: Reduce the .text (code) segment by 3,616 bytes. Reduce the .rdata section by 8,656 bytes. Reduce the total binary file size by 13312 bytes. These are the worst offenders for pdf.dll as shown in: https://drive.google.com/open?id=1BvubxoA2SU_2e4T5cq7jHTjc1TlT0qOndpIfX3DMeA8&authuser=0 This will also drastically simplify the list of work to be done for bug 441899 (getting rid of initializers). BUG=441988 R=bo_xu@foxitsoftware.com Review URL: https://codereview.chromium.org/802013002
2014-11-17Merge to XFA: patch from CL 730993002Bo Xu
2014-11-03Merge XFA to PDFium master at 4dc95e7 on 10/28/2014Bo Xu
2014-08-13Remove try/catch blockBo Xu
BUG=pdfium:28 R=thakis@chromium.org Review URL: https://codereview.chromium.org/472563002
2014-06-19Fix JS_WIDESTRING to work with clang-clJohn Abd-El-Malek
MSVC lexes L#macro_arg as a single wide string literal token, but Clang and other C/C++ compliant lexers do not. There was already a workaround to use implicit string concatenation for GCC, but there's a simpler solution of token pasting the L onto the stringized macro argument with 'L###macro_arg'. This works with Clang, GCC, and MSVC. R=jun_fang@foxitsoftware.com, jam@chromium.org BUG=82385 Original patch by Reid Kleckner <rnk@chromium.org> Review URL: https://codereview.chromium.org/345643002
2014-05-23Convert all line endings to LF.John Abd-El-Malek
2014-05-20Remove "using namespace v8" in header. This allows us to turn all warnings ↵John Abd-El-Malek
into errors. It also makes it clearer to find usage of v8 in the library.
2014-05-17Initial commit.John Abd-El-Malek