}
This API has been reviewed in https://docs.google.com/document/d/1c4NKpXwpQ9MKK1SbJ4C6MvhXI8-KJZ4jq7N4VHTHJoI/edit?disco=AAABP1bXnb4
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
/cc @jbroman since they proposed the WriteAllData API (thanks!)
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
MojoResult result = producer_->WriteAllData(base::as_bytes(buffer));
Do we need to handle a failure result here and not increment the buffer size below?
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
MojoResult result = producer_->WriteAllData(base::as_bytes(buffer));
Do we need to handle a failure result here and not increment the buffer size below?
Good catch. Yes, it seems that `num_bytes_written_` should stay the same if there was an error.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
This API has been reviewed in https://docs.google.com/document/d/1c4NKpXwpQ9MKK1SbJ4C6MvhXI8-KJZ4jq7N4VHTHJoI/edit?disco=AAABP1bXnb4
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
Commit-Queue | +2 |
In the latest patchset I am fixing a build problem I've introduced when rebasing: https://chromium-review.googlesource.com/c/chromium/src/+/5646444/5..7/components/openscreen_platform/tls_client_connection.cc
I think this is straightforward enough to just retry CQ+2.
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
6 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: components/openscreen_platform/tls_client_connection.cc
Insertions: 1, Deletions: 5.
@@ -60,11 +60,7 @@
return false;
}
- // SAFETY: Relying on the caller to provide valid `data` and `len`.
- // TODO(https://crbug.com/344896902): `span`-ify this API.
- base::span<const uint8_t> span =
- UNSAFE_BUFFERS(base::span(static_cast<const uint8_t*>(data), len));
- const MojoResult result = send_stream_->WriteAllData(span);
+ const MojoResult result = send_stream_->WriteAllData(data);
mojo::HandleSignalsState state = send_stream_->QuerySignalsState();
return ProcessMojoResult(result, state.peer_closed()
? Error::Code::kSocketClosedFailure
```
Introducing `mojo::DataPipeProducedHandle::WriteAllData` method.
The new method offers a more ergonomic alternative to using
`MOJO_WRITE_DATA_FLAG_ALL_OR_NONE`. For more details and discussion
please see
https://docs.google.com/document/d/1c4NKpXwpQ9MKK1SbJ4C6MvhXI8-KJZ4jq7N4VHTHJoI/edit#heading=h.ti2k549mrv1h
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |