)]}'
{
  "commit": "abef75693d96caadd6eb2cd38542e719932e8b4d",
  "tree": "359f6606c5da2fd5adad7cad10394785d9b8ed79",
  "parents": [
    "06878247b4caf187a6717b2409e5c37694a46a54"
  ],
  "author": {
    "name": "Sunny Sachanandani",
    "email": "sunnyps@chromium.org",
    "time": "Mon Apr 21 15:19:26 2025 -0700"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Mon Apr 21 15:19:26 2025 -0700"
  },
  "message": "Reland \"Reland \"[ios blink] Implement futures using WaitListEvent\"\"\n\nThis is a reland of commit a218ceac197ff55273d80942e114eea9d6dcc90c\n\nThe only substantive change over the original is that we release the\nwaiterLock before iterating through the events at the end so that TSAN\ndoesn\u0027t get tripped up by the benign lock order inversion between\nSyncWaiter::mutex and WaitListEvent::mMutex.\n\nOriginal change\u0027s description:\n\u003e Reland \"[ios blink] Implement futures using WaitListEvent\"\n\u003e\n\u003e This is a reland of commit abc42736ef28ed8fcc11e66814907febff6ee930\n\u003e\n\u003e The only change over the original is the correct initialization of the\n\u003e `mSignaled` atomic_bool in WaitListEvent.\n\u003e\n\u003e Original change\u0027s description:\n\u003e \u003e [ios blink] Implement futures using WaitListEvent\n\u003e \u003e\n\u003e \u003e Currently, most futures are implemented using SystemEvent. This includes\n\u003e \u003e already completed and non-progressing events. This is problematic on iOS\n\u003e \u003e where BrowserEngineKit child processes are not allowed to open fds, mach\n\u003e \u003e ports, etc.\n\u003e \u003e\n\u003e \u003e This CL introduces WaitListEvent which mimics the base::WaitableEvent\n\u003e \u003e implementation in Chromium for POSIX platforms. The event internally\n\u003e \u003e maintains a list of waiters corresponding to a WaitAny call. In WaitAny,\n\u003e \u003e we create a SyncWaiter that\u0027s signaled using a condition variable. The\n\u003e \u003e waiter is added to each event that the WaitAny is waiting on. The events\n\u003e \u003e also have a mutex to allow multiple threads to wait on them. We acquire\n\u003e \u003e the event locks in a globally consistent order (sorted by address) to\n\u003e \u003e prevent lock order inversion. WaitListEvents can also be waited on\n\u003e \u003e asynchronously by returning a SystemEventReceiver which allows mixing\n\u003e \u003e waits on SystemEvents and WaitListEvents.\n\u003e \u003e\n\u003e \u003e In addition, this CL changes how already signaled and non-progressing\n\u003e \u003e TrackedEvents are represented. Already signaled events are backed by\n\u003e \u003e WaitListEvents and non-progressing events become a flag on TrackedEvent.\n\u003e \u003e\n\u003e \u003e The code in EventManager is also cleaned up to aid readability and fix\n\u003e \u003e an edge case of waiting on multiple queues with zero timeout - we could\n\u003e \u003e end up ticking the same queue multiple times causing a subtle race\n\u003e \u003e between MapAsync and OnSubmittedWorkDone futures completion.\n\u003e \u003e\n\u003e \u003e Bug: 407801085\n\u003e \u003e Change-Id: I1c5deb8097339be5beb5e9021d753998a074bea3\n\u003e \u003e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/234277\n\u003e \u003e Reviewed-by: Loko Kung \u003clokokung@google.com\u003e\n\u003e \u003e Auto-Submit: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\n\u003e \u003e Commit-Queue: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\n\u003e \u003e Reviewed-by: Kai Ninomiya \u003ckainino@chromium.org\u003e\n\u003e \u003e Commit-Queue: Kai Ninomiya \u003ckainino@chromium.org\u003e\n\u003e\n\u003e Bug: 407801085\n\u003e Change-Id: I254398256851f2310ddfe906c79d389dae1d3d77\n\u003e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/237719\n\u003e Commit-Queue: Corentin Wallez \u003ccwallez@chromium.org\u003e\n\u003e Reviewed-by: Kai Ninomiya \u003ckainino@chromium.org\u003e\n\u003e Commit-Queue: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\n\u003e Reviewed-by: Corentin Wallez \u003ccwallez@chromium.org\u003e\n\u003e Commit-Queue: Kai Ninomiya \u003ckainino@chromium.org\u003e\n\u003e Auto-Submit: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\n\nBug: 407801085\nChange-Id: I31561d82321658370defab8cec37591e35d4c932\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/237723\nReviewed-by: Corentin Wallez \u003ccwallez@chromium.org\u003e\nAuto-Submit: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\nCommit-Queue: Sunny Sachanandani \u003csunnyps@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "fd055fce2606d69b909889130ba9434027538573",
      "old_mode": 33188,
      "old_path": "src/dawn/native/BUILD.gn",
      "new_id": "d3bdd6275c171b44565668eb7d63b08390a524be",
      "new_mode": 33188,
      "new_path": "src/dawn/native/BUILD.gn"
    },
    {
      "type": "modify",
      "old_id": "f99f976196973a72f77b0bc7afe2b9001d7b5b01",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Buffer.cpp",
      "new_id": "46aebb1e05548aa29ad6d958392cbccb620798b4",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Buffer.cpp"
    },
    {
      "type": "modify",
      "old_id": "06d784526ba715a1fbc5f13b547a5e8e3bdd0913",
      "old_mode": 33188,
      "old_path": "src/dawn/native/CMakeLists.txt",
      "new_id": "2ef2e077a1d1cb9ded078538abce78e2210d3c3f",
      "new_mode": 33188,
      "new_path": "src/dawn/native/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "844d1d2346e79757cdf21278b05b391fcd6e12a1",
      "old_mode": 33188,
      "old_path": "src/dawn/native/CreatePipelineAsyncEvent.cpp",
      "new_id": "3599b457176e9052d37b5761c3c19002c3cf1e1a",
      "new_mode": 33188,
      "new_path": "src/dawn/native/CreatePipelineAsyncEvent.cpp"
    },
    {
      "type": "modify",
      "old_id": "b2fefa6815b9591eb98ebe0ffc0410e3e0294422",
      "old_mode": 33188,
      "old_path": "src/dawn/native/CreatePipelineAsyncEvent.h",
      "new_id": "a6bd1e03d12df1e2c922ab0a15d5bbd9c47b0a69",
      "new_mode": 33188,
      "new_path": "src/dawn/native/CreatePipelineAsyncEvent.h"
    },
    {
      "type": "modify",
      "old_id": "6c264acccb2c5fc117a342064cd7fed7a1bba464",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Device.cpp",
      "new_id": "303baab705a5b3121e9200560c0e0b433051a45a",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Device.cpp"
    },
    {
      "type": "modify",
      "old_id": "835f92c12700343a68fbc2b48ee83b18fcf5703e",
      "old_mode": 33188,
      "old_path": "src/dawn/native/EventManager.cpp",
      "new_id": "2780fe269f59644276a98cfad4829018a02936bf",
      "new_mode": 33188,
      "new_path": "src/dawn/native/EventManager.cpp"
    },
    {
      "type": "modify",
      "old_id": "6ef872b605dfcca45cd94738987984a91e21d88a",
      "old_mode": 33188,
      "old_path": "src/dawn/native/EventManager.h",
      "new_id": "a6a4ec025821ea705ecda32b366d511419a0ea02",
      "new_mode": 33188,
      "new_path": "src/dawn/native/EventManager.h"
    },
    {
      "type": "modify",
      "old_id": "c4f3532cfa38958f45d4a73f00754369eec3d915",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Queue.cpp",
      "new_id": "ef30378c5b74f6b3f4c5626932dd9ccd0dc763f1",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Queue.cpp"
    },
    {
      "type": "modify",
      "old_id": "bcc3777eb18fd2500ebbfdb2b77d7ef596d9b2fc",
      "old_mode": 33188,
      "old_path": "src/dawn/native/Queue.h",
      "new_id": "1e166a84982975b055e1576dc16ab2a498a3308c",
      "new_mode": 33188,
      "new_path": "src/dawn/native/Queue.h"
    },
    {
      "type": "modify",
      "old_id": "f8dd1c8326dfbec57757ab11d0696d32d59d8528",
      "old_mode": 33188,
      "old_path": "src/dawn/native/SystemEvent.cpp",
      "new_id": "2b8fe065fa604a88361e9e98c44339b2e77c73d9",
      "new_mode": 33188,
      "new_path": "src/dawn/native/SystemEvent.cpp"
    },
    {
      "type": "modify",
      "old_id": "391d430c8a71fc2d0557a20d12e9d6599cf58f05",
      "old_mode": 33188,
      "old_path": "src/dawn/native/SystemEvent.h",
      "new_id": "2a649dc35ac40549b940dfcd737e86f3d7c9f219",
      "new_mode": 33188,
      "new_path": "src/dawn/native/SystemEvent.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8a2f422ab448bd31e6c3f60baf4e1586a10867fd",
      "new_mode": 33188,
      "new_path": "src/dawn/native/WaitListEvent.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "be50235b652a727a29dcaaa8a17ae115e1ca11ad",
      "new_mode": 33188,
      "new_path": "src/dawn/native/WaitListEvent.h"
    },
    {
      "type": "modify",
      "old_id": "67a11c28bf6ee4710b14267fba91ac00af7e107d",
      "old_mode": 33188,
      "old_path": "src/dawn/native/metal/QueueMTL.h",
      "new_id": "1e03df31d99195c5314ff3c706b5b78bda504ca6",
      "new_mode": 33188,
      "new_path": "src/dawn/native/metal/QueueMTL.h"
    },
    {
      "type": "modify",
      "old_id": "f1d3f04fd2635e4958710878a2185e55da87ca9f",
      "old_mode": 33188,
      "old_path": "src/dawn/native/metal/QueueMTL.mm",
      "new_id": "b51248ad832c4cd581fd72eabbdcc47d8c8f350e",
      "new_mode": 33188,
      "new_path": "src/dawn/native/metal/QueueMTL.mm"
    },
    {
      "type": "modify",
      "old_id": "cb9b140042a7e39c016f9b5309fe2d990b962f94",
      "old_mode": 33188,
      "old_path": "src/dawn/tests/BUILD.gn",
      "new_id": "05ab8eca507e5e2171384872d011016ce32df5d7",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "b97c7c91d17490c6343f63e4b13fa815db5b0741",
      "new_mode": 33188,
      "new_path": "src/dawn/tests/white_box/WaitListEventTests.cpp"
    }
  ]
}
