)]}'
{
  "commit": "69c68d01b2420e77283166ffcc7ddb4b0fbc2505",
  "tree": "6e0888b30be9a1da3bbc15c1a3cec3f2d1ede398",
  "parents": [
    "4950095ac9c1023ef5101eb1bb7ef8804c29981e"
  ],
  "author": {
    "name": "Rafael Cintron",
    "email": "rafael.cintron@microsoft.com",
    "time": "Fri Jan 10 17:58:28 2020 +0000"
  },
  "committer": {
    "name": "Commit Bot service account",
    "email": "commit-bot@chromium.org",
    "time": "Fri Jan 10 17:58:28 2020 +0000"
  },
  "message": "Improve Memory Management of Result class\n\nThe way in which the Result class is used in Dawn can be fragile\nwith respect to memory management because the caller of AcquireError\nmust know they need to delete the returned pointer or a memory leak\nwill occur. We\u0027ve had a couple of instances where developers have\naccidentally left out the delete call and managed to get past code\nreview.\n\nThis CL changes the Result class so that it assumes the error is\nallocated on the heap and forces the caller to use unique_ptr when\ncalling AcquireError.\n\nBug:dawn:320\nChange-Id: I13ec953b0c37eaafbd6ce93c2f719b4743676acb\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14960\nReviewed-by: Austin Eng \u003cenga@chromium.org\u003e\nReviewed-by: Corentin Wallez \u003ccwallez@chromium.org\u003e\nCommit-Queue: Rafael Cintron \u003crafael.cintron@microsoft.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5287bee66d755ef461ddc11c45420649d5b38189",
      "old_mode": 33188,
      "old_path": "BUILD.gn",
      "new_id": "c7df5827aa35448f88a0e7708381bf92d225980e",
      "new_mode": 33188,
      "new_path": "BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "3e33052fb3566bbbd3ee3f61ed5efccbededefc8",
      "old_mode": 33188,
      "old_path": "src/common/Result.h",
      "new_id": "7dc5e2df9eeab87cfa7fdbad961e00b86fff947f",
      "new_mode": 33188,
      "new_path": "src/common/Result.h"
    },
    {
      "type": "modify",
      "old_id": "3926a89286276019fd5d61ee68d825ba536ad015",
      "old_mode": 33188,
      "old_path": "src/dawn_native/Device.cpp",
      "new_id": "f5609dc9c76cfbb77815b574d6f6ab752d864c38",
      "new_mode": 33188,
      "new_path": "src/dawn_native/Device.cpp"
    },
    {
      "type": "modify",
      "old_id": "aa6471fbc5990d2e69beefb3f776f2c609f99a0e",
      "old_mode": 33188,
      "old_path": "src/dawn_native/Device.h",
      "new_id": "9d0947d2b70f6a3d729c4876e801dd2b85f2acc1",
      "new_mode": 33188,
      "new_path": "src/dawn_native/Device.h"
    },
    {
      "type": "modify",
      "old_id": "c16d544c0fc0a845c52c4e74fea254f749d572c2",
      "old_mode": 33188,
      "old_path": "src/dawn_native/EncodingContext.h",
      "new_id": "1eef6c5b26b9445f274fcd6cc4443150b6d7a0e0",
      "new_mode": 33188,
      "new_path": "src/dawn_native/EncodingContext.h"
    },
    {
      "type": "delete",
      "old_id": "195afb2e024454c070a287489e05bc0919b44303",
      "old_mode": 33188,
      "old_path": "src/dawn_native/Error.cpp",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "modify",
      "old_id": "b4b968ae137e98d94217f68249a6deb81e34ce35",
      "old_mode": 33188,
      "old_path": "src/dawn_native/Error.h",
      "new_id": "7f9dbcbc1e600e9f010bf0105290ed50d873768b",
      "new_mode": 33188,
      "new_path": "src/dawn_native/Error.h"
    },
    {
      "type": "modify",
      "old_id": "2cd01da27734dd091747f8f39a632466e854f373",
      "old_mode": 33188,
      "old_path": "src/dawn_native/ErrorData.cpp",
      "new_id": "bdfed7fdaabd4e6b003a3d4e0ae3bf4dff425839",
      "new_mode": 33188,
      "new_path": "src/dawn_native/ErrorData.cpp"
    },
    {
      "type": "modify",
      "old_id": "a73d90dd2341c59672517bcb2720600c9097b736",
      "old_mode": 33188,
      "old_path": "src/dawn_native/ErrorData.h",
      "new_id": "27004de2f0c4b363d8043e586e3b265088fdec78",
      "new_mode": 33188,
      "new_path": "src/dawn_native/ErrorData.h"
    },
    {
      "type": "modify",
      "old_id": "7219ab6a7b689f4b6452a30f673525ca3097ea93",
      "old_mode": 33188,
      "old_path": "src/dawn_native/Instance.cpp",
      "new_id": "735c61717fcaf69db206a9f77794e9a3176538fc",
      "new_mode": 33188,
      "new_path": "src/dawn_native/Instance.cpp"
    },
    {
      "type": "modify",
      "old_id": "f7d5bc82ea6cede540934fb00481fb3e1ea13891",
      "old_mode": 33188,
      "old_path": "src/tests/unittests/ErrorTests.cpp",
      "new_id": "514c7408651549ec5f9ebbb5382ca388f86cec33",
      "new_mode": 33188,
      "new_path": "src/tests/unittests/ErrorTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "d991462b13c30d788ca054953315966695cffcd7",
      "old_mode": 33188,
      "old_path": "src/tests/unittests/ResultTests.cpp",
      "new_id": "dd87e22a93e9efeb6f65fb4e7bc84da39c9131bd",
      "new_mode": 33188,
      "new_path": "src/tests/unittests/ResultTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "938bd5dd72f9699e964e1da89c762a01f7eb90d0",
      "old_mode": 33188,
      "old_path": "src/tests/white_box/VulkanErrorInjectorTests.cpp",
      "new_id": "bd4a49e1ae7ee2c3512a541abaa64d7784a2ef0a",
      "new_mode": 33188,
      "new_path": "src/tests/white_box/VulkanErrorInjectorTests.cpp"
    }
  ]
}
