)]}'
{
  "commit": "20838941240536b52e24e47ce99ad6c2175dba1a",
  "tree": "0ad7170ac814ee458161ffbe76d865ec86523642",
  "parents": [
    "80baee12eda75c0bb7d55308a556ebf1104fcec9"
  ],
  "author": {
    "name": "Yuwei Huang",
    "email": "yuweih@chromium.org",
    "time": "Tue May 09 23:01:33 2023"
  },
  "committer": {
    "name": "WebRTC LUCI CQ",
    "email": "webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Wed May 10 06:36:19 2023"
  },
  "message": "Fix bug of messages being delivered before data channel is open\n\nIf the caller calls RegisterObserver() on the network thread while the\nstate is not kOpen but there are queued received data, those received\ndata will be immediately delivered to the observer before the state is\ntransitioned to kOpen, which may break the observer\u0027s assertions and\ncause problems.\n\nThe problem turns out to be that, when SctpDataChannel::RegisterObserver\ncalls DeliverQueuedReceivedData(), the data will be passed to the\nobserver without checking the |state_| first, meanwhile\nSctpDataChannel::UpdateState does effectively check the state and\nnull-check |observer_| before delivering the received data. This CL\nfixes this by simply making DeliverQueuedReceivedData() also check\n`state_ \u003d\u003d kOpen`. In case the state transitions to kOpen after\nRegisterObserver() is called, the first DeliverQueuedReceivedData()\ncall will be no-op, while the second DeliverQueuedReceivedData() call\nwill do the work.\n\nBug: chromium:1442696\nChange-Id: If25ce6a038d704939b1a8ae73d7ced110448b050\nReviewed-on: https://webrtc-review.googlesource.com/c/src/+/304687\nReviewed-by: Tomas Gunnarsson \u003ctommi@webrtc.org\u003e\nCommit-Queue: Tomas Gunnarsson \u003ctommi@webrtc.org\u003e\nCr-Commit-Position: refs/heads/main@{#40036}\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e024c609705313e059cc6f0973bdcda6f9bdc231",
      "old_mode": 33188,
      "old_path": "pc/sctp_data_channel.cc",
      "new_id": "a17008fb3fff6550cbc289008787213310427edb",
      "new_mode": 33188,
      "new_path": "pc/sctp_data_channel.cc"
    }
  ]
}
