)]}'
{
  "commit": "2855deed06cfc43d7f509b1914d55b625a10d00f",
  "tree": "5a6d3a33074438bc673e73b16c460c0e82293080",
  "parents": [
    "e4cebef61bc684f993e130a3888080345a6c08f8"
  ],
  "author": {
    "name": "Lei Zhang",
    "email": "thestig@chromium.org",
    "time": "Tue Apr 02 16:07:02 2024 +0000"
  },
  "committer": {
    "name": "Pdfium LUCI CQ",
    "email": "pdfium-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Tue Apr 02 16:07:02 2024 +0000"
  },
  "message": "Do not write out /Page objects that are not in the page tree\n\nFPDFPage_Delete() may not work as expected when used in conjunction with\nFPDF_SaveAsCopy(). The CPDF_Creator code that saves the PDF does not\nunderstand the structure of the document\u0027s page tree. Therefore, it\nonly looks at references to determine whether to save referenced\nobjects, or to discard orphaned objects. This becomes a problem when\nbookmarks or other objects has references to page objects, as the page\nobjects are not considered orphaned.\n\nFix this problem by augmenting the page deletion code in CPDF_Document.\nAfter a page has been deleted, check to see if there are any references\nto the page in the page tree. If it is no longer in the page tree,\nreplace it with an object of type null.\n\nSince it is likely impossible to traverse the entire PDF\u0027s object tree\nand correctly remove all the references to a page, use the null object\ntype to null out the page is the best way to effectively remove it,\nwhile preventing references to it from dangling. Objects that become\norphaned as a result of this modification, such as the page content\nstream, will be pruned by CPDF_Creator.\n\nBug: pdfium:2146\nChange-Id: I474ff921e2239f27652f5308b56d1c1b74b51d77\nReviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/117910\nReviewed-by: Thomas Sepez \u003ctsepez@google.com\u003e\nCommit-Queue: Lei Zhang \u003cthestig@chromium.org\u003e\nReviewed-by: Tom Sepez \u003ctsepez@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "2ce880b68acdf0a2892c1af632d487cf58921147",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/parser/cpdf_document.cpp",
      "new_id": "3012690fe99814b8b2aa6ca743cfb3ee828443a0",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/parser/cpdf_document.cpp"
    },
    {
      "type": "modify",
      "old_id": "4e00e51b8fbb23c94010924b19998289f6b902e7",
      "old_mode": 33188,
      "old_path": "core/fpdfapi/parser/cpdf_document.h",
      "new_id": "ac162a61f6cc42655b848d765f138d3cd4ea87cf",
      "new_mode": 33188,
      "new_path": "core/fpdfapi/parser/cpdf_document.h"
    },
    {
      "type": "modify",
      "old_id": "3cde698b794351e4272eae4a9325da01fb00d7ff",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_doc_embeddertest.cpp",
      "new_id": "8c443468758a3d7653cde66c2bbeab8398a74680",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_doc_embeddertest.cpp"
    },
    {
      "type": "modify",
      "old_id": "e5c380a91bc5157d3edd30d4154d997fc10265a1",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdf_editpage.cpp",
      "new_id": "ffc6a117920b9a3d576a83274298106c99816b76",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdf_editpage.cpp"
    },
    {
      "type": "modify",
      "old_id": "ad94b24c42c06b015776b56a184faba4113e0809",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdfxfa/cpdfxfa_context.cpp",
      "new_id": "7f4753df5bcb8a92e7c062d441ab0a898c222456",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdfxfa/cpdfxfa_context.cpp"
    },
    {
      "type": "modify",
      "old_id": "a8b563ec3e488cd5c2cdcf3ce69979ef2be7b91c",
      "old_mode": 33188,
      "old_path": "fpdfsdk/fpdfxfa/cpdfxfa_context.h",
      "new_id": "dd600c308e52ff4a2ea4e958721b3c5015dbea6c",
      "new_mode": 33188,
      "new_path": "fpdfsdk/fpdfxfa/cpdfxfa_context.h"
    }
  ]
}
