)]}'
{
  "commit": "0bcd37bd2b83f1a9ee17088037ebdfe6eab6d31a",
  "tree": "dce7dd9d19b0802d35354f1d382ebeac19a908cd",
  "parents": [
    "3d773bba0927e67eae8fdaee5e28b0f6203d3bee"
  ],
  "author": {
    "name": "Bruce Dawson",
    "email": "brucedawson@google.com",
    "time": "Thu Aug 11 07:29:24 2022 -0700"
  },
  "committer": {
    "name": "Commit Bot",
    "email": "commit-bot@chromium.org",
    "time": "Thu Aug 11 16:48:02 2022 +0000"
  },
  "message": "Avoid ACCESS_DENIED when writing build.ninja on Windows\n\nWindows is more fussy about writing to files that are open which cause\nupdates to build.ninja to reliably fail after recent changes. This fixes\nthe issue by closing build_ninja_file (build.ninja) before writing to\nit.\n\nMinimal tests of WriteFileAtomically were also added in hopes that they\nwould reveal the failure, but that was before the nature of the bug was\nknown. Unfortunately this bug would only appear in an integration test.\n\nThe real issue was found by modifying the code to spin in a loop when\nthe failure was hit, attaching a debugger, pausing to inspect variables,\nand then using sysinternals\u0027 \"handle.exe\" to find which file was locked.\n\nBug: https://bugs.chromium.org/p/chromium/issues/detail?id\u003d1351858\nChange-Id: I99e7816771de0feb00ec9889640c9cdcaae6f3be\nReviewed-on: https://gn-review.googlesource.com/c/gn/+/14380\nCommit-Queue: Sylvain Defresne \u003csdefresne@chromium.org\u003e\nReviewed-by: Sylvain Defresne \u003csdefresne@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aa227f63cdbeab6f4b9a196d112e8bafb9b68a29",
      "old_mode": 33188,
      "old_path": ".gitignore",
      "new_id": "da52c70e260217a2b60dbcfcf8f5c0783f6e21fa",
      "new_mode": 33188,
      "new_path": ".gitignore"
    },
    {
      "type": "modify",
      "old_id": "ce9d76843a6a7fdedf8bd063b0b9387aa7185617",
      "old_mode": 33261,
      "old_path": "build/gen.py",
      "new_id": "fa23266cc162e7b5d52506570139ed3bc253bf78",
      "new_mode": 33261,
      "new_path": "build/gen.py"
    },
    {
      "type": "modify",
      "old_id": "030f2d5bd1ca627ccc5c68f0cacadd80efeb5bce",
      "old_mode": 33188,
      "old_path": "src/gn/commands.cc",
      "new_id": "93365ad159dd317a136c9a4f6750f7b50d8db3ce",
      "new_mode": 33188,
      "new_path": "src/gn/commands.cc"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "c1d3372ae0c37f5191736ed6d2c28ab30c7848e8",
      "new_mode": 33188,
      "new_path": "src/util/atomic_write_unittest.cc"
    }
  ]
}
