)]}'
{
  "commit": "9118ac819a67b9da728a7b057bf0b3671102ebee",
  "tree": "40c51c18b7023399e4d2070d10c654c607674bc8",
  "parents": [
    "e78b30d80b733d50944df18358efaae7cba6ea3f"
  ],
  "author": {
    "name": "Daniele Di Proietto",
    "email": "ddiproietto@google.com",
    "time": "Wed Aug 02 14:47:29 2023 +0000"
  },
  "committer": {
    "name": "Daniele Di Proietto",
    "email": "ddiproietto@google.com",
    "time": "Wed Aug 02 14:55:28 2023 +0000"
  },
  "message": "ipc: Remove wrong DeferredBase constructor.\n\nDeferredBase had a constructor that accepted a Deferred\u003cT\u003e and moved its\ncallback to the new DeferredBase.\n\nThe problem with moving an std::function is that what\u0027s left in the\noriginal is unspecified (but valid): a copy of the original callback\ncould be stuck there and it could be called when the formal parameter (a\ncopy) would be destroyed.\n\nWith this commit, we use the non inline DeferredBase(DeferredBase\u0026\u0026)\nmove constructor (it works, since Deferred\u003cT\u003e is a DeferredBase).\nThere\u0027s actually already a comment in deferred.cc that explains that:\n\n```\n// Can\u0027t just use \"\u003d default\" here because the default move operator for\n// std::function doesn\u0027t necessarily swap and hence can leave a copy of the\n// bind state around, which is undesirable.\n```\n\nSince the problem is based on unspecified behavior, we only managed to\ntrigger it in CI in conjuction with https://r.android.com/2686526\n\nThis also seems to reduce the binary size of the libperfetto_c.so by a\ncouple of kilobytes.\n\nChange-Id: I787cd4a5f1722f7c83492bd3581b2c9e8e7f56f0\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aa4cbbdb5efa1c0d7c38005e8dacb3896754cafd",
      "old_mode": 33188,
      "old_path": "include/perfetto/ext/ipc/deferred.h",
      "new_id": "cb04820f48d4b1bd71b701695c47f93e2e19c688",
      "new_mode": 33188,
      "new_path": "include/perfetto/ext/ipc/deferred.h"
    }
  ]
}
