Pass IJS_Runtime, not IJS_Context, to native object constructors.

This better separates the two IJS_ classes, with the IJS_Context
taking on its proper role of describing an event. There's no need
for the event details for object creation, so this gets much
cleaner.

Move some JS error reporting code from CJS_Context to CJS_Runtime.
Make InitInstance() and ExitInstance() voids, they always return
TRUE and we never check the result anyways.

R=thestig@chromium.org

Review URL: https://codereview.chromium.org/1389163007 .
21 files changed
tree: d2c3a5ee4f67227ac33199f6d10caaf204c92896
  1. build/
  2. core/
  3. docs/
  4. fpdfsdk/
  5. public/
  6. samples/
  7. testing/
  8. third_party/
  9. .clang-format
  10. .gitignore
  11. AUTHORS
  12. BUILD.gn
  13. codereview.settings
  14. DEPS
  15. LICENSE
  16. OWNERS
  17. pdfium.gni
  18. pdfium.gyp
  19. PRESUBMIT.py
  20. README.md
README.md

Building PDFium

Prerequisites

Get the chromium depot tools via the instructions at http://www.chromium.org/developers/how-tos/install-depot-tools (this provides the gclient utilty needed below).

Also install Python, Subversion, and Git and make sure they're in your path.

Optionally, you may want to install the Ninja build system (recommended) rather than using your platform-specific build system.

Get the code

mkdir pdfium
cd pdfium
gclient config --name . --unmanaged https://pdfium.googlesource.com/pdfium.git
gclient sync

Generate the build files

Now we use the GYP library to generate the build files.

At this point, you have two options. The first option is to use the [Ninja] (http://martine.github.io/ninja/) build system. This is the default as of mid-September, 2015. Previously, the second option was the default. Most PDFium developers use Ninja, as does our [continuous build system] (http://build.chromium.org/p/client.pdfium/).

On Windows: build\gyp_pdfium For all other platforms: build/gyp_pdfium

The second option is to generate platform-specific build files, i.e. Makefiles on Linux, sln files on Windows, and xcodeproj files on Mac. To do so, set the GYP_GENERATORS environment variable appropriately (e.g. “make”, “msvs”, or “xcode”) before running the above command.

Building the code

If you used Ninja, you can build the sample program by: ninja -C out/Debug pdfium_test You can build the entire product (which includes a few unit tests) by: ninja -C out/Debug

If you're not using Ninja, then building is platform-specific.

On Linux: make pdfium_test

On Mac, open build/all.xcodeproj

On Windows, open build\all.sln

Running the sample program

The pdfium_test program supports reading, parsing, and rasterizing the pages of a .pdf file to .ppm or .png output image files (windows supports two other formats). For example: out/Debug/pdfium_test --ppm path/to/myfile.pdf

Waterfall

The current health of the source tree can be found at http://build.chromium.org/p/client.pdfium/console

Branches

There is a branch for a forthcoming feature called XFA that you can get by following the steps above, then: git checkout origin/xfa build/gyp_pdfium ninja -C out/Debug