)]}'
{
  "commit": "3e98158a6c47361ca7d6c2c18d47c9f8f3aabb8a",
  "tree": "704926c3b5edbabde50fbee3aa1abceb8e180e72",
  "parents": [
    "9b57ec9ff50aeab53cf3f028222f69c78840385d"
  ],
  "author": {
    "name": "tonikitoo",
    "email": "tonikitoo@igalia.com",
    "time": "Fri Aug 26 08:37:10 2016 -0700"
  },
  "committer": {
    "name": "Commit bot",
    "email": "commit-bot@chromium.org",
    "time": "Fri Aug 26 08:37:10 2016 -0700"
  },
  "message": "Extend pdfium_test capability so that more Javascript can be executed\n\nIn [1], the lack of support of pdfium_test to some application\nlevel hooks was felt.\nMore specifically, the lack of implementation of the hook FFI_GetPage,\ncalled  when \u0027this.getAnnot()\u0027 is executed in an Acrobar JS context,\nmakes it non-trivial to JS texts that manipulate PDF annotations.\n\n[1] https://codereview.chromium.org/2265313002/\n\nHere is the failing call stack in pdfium_test:\n\n0 ::RenderPdf                              (samples/pdfium_test.cc)\n1 ::FORM_DoDocumentOpenAction              (fpdfsdk/fpdfformfill.cpp)\n2 CPDFSDK_Document::ProcOpenAction         (fpdfsdk/fsdk_mgr.cpp)\n3 CPDFSDK_ActionHandler::DoAction_DocOpen  (fpdfsdk/fsdk_actionhandler.cpp)\n  \u003c----v8----\u003e\n4 Document::getAnnot                       (fpdfsdk/javascript/Document.cpp)\n5 CPDFSDK_Document::GetPageView            (fpdfsdk/fsdk_mgr.cpp)\n6 CPDFDoc_Environment::FFI_GetPage         (fpdfsdk/include/fsdk_mgr.h)\n\n(frame 6 returns nullptr, and getAnnot call in frame 4 bails)\n\nCL extends pdfium_test app with a FFI_GetPage hook implementation.\n\nBasically what FFI_GetPage does is returning a FPDF_PAGE instance.\nIn case of pdfium_test, FPDF_PAGE instances were only created on demand\nwhen the page was going to get rendered, and then discarded.\n\nSince FFI_GetPage can be called by JS before pages are rendered,\nCL moved the page creation code into a helper function, and cached\nthe FPDF_PAGE instances created in a map, so it does not recreate\nthem needlessly.\n\nBUG\u003dpdfium:492\n\nReview-Url: https://codereview.chromium.org/2277063003\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "da2d1f6977fa45e71fdf72ea756e96a9426a68e3",
      "old_mode": 33188,
      "old_path": "samples/pdfium_test.cc",
      "new_id": "421df39bf3cdfe30d56326dad52a585e444ea490",
      "new_mode": 33188,
      "new_path": "samples/pdfium_test.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3a6486d32fd0fb166eb7849f185a2733c2c2fd30",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/bug_492.pdf"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c0fc1f4f601f1398fe5d232b0e00abbee846aa0e",
      "new_mode": 33188,
      "new_path": "testing/resources/pixel/bug_492.pdf.0.png"
    }
  ]
}
