Introducing `mojo::DataPipeProducedHandle::WriteAllData` method. [chromium/src : main]

0 views
Skip to first unread message

Łukasz Anforowicz (Gerrit)

unread,
Jun 21, 2024, 5:37:34 PM (8 days ago) Jun 21
to Daniel Cheng, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org
Attention needed from Daniel Cheng

Łukasz Anforowicz added 2 comments

Patchset-level comments
File-level comment, Patchset 4 (Latest):
Łukasz Anforowicz . resolved

@dcheng, can you PTAL?

File mojo/public/cpp/system/data_pipe.h
Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 4
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Fri, 21 Jun 2024 21:37:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Łukasz Anforowicz (Gerrit)

unread,
Jun 21, 2024, 5:38:01 PM (8 days ago) Jun 21
to Jeremy Roman, Daniel Cheng, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org
Attention needed from Daniel Cheng

Łukasz Anforowicz added 1 comment

Patchset-level comments
Łukasz Anforowicz . resolved

/cc @jbroman since they proposed the WriteAllData API (thanks!)

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 4
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Fri, 21 Jun 2024 21:37:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jun 21, 2024, 10:09:35 PM (8 days ago) Jun 21
to Łukasz Anforowicz, Jeremy Roman, Daniel Cheng, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org
Attention needed from Łukasz Anforowicz

Daniel Cheng added 1 comment

File content/common/service_worker/race_network_request_write_buffer_manager.cc
Line 115, Patchset 4 (Latest): MojoResult result = producer_->WriteAllData(base::as_bytes(buffer));
Daniel Cheng . unresolved

Do we need to handle a failure result here and not increment the buffer size below?

Open in Gerrit

Related details

Attention is currently required from:
  • Łukasz Anforowicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 4
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Comment-Date: Sat, 22 Jun 2024 02:09:27 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Łukasz Anforowicz (Gerrit)

unread,
Jun 24, 2024, 1:54:30 PM (5 days ago) Jun 24
to Jeremy Roman, Daniel Cheng, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org
Attention needed from Daniel Cheng

Łukasz Anforowicz added 2 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Łukasz Anforowicz . resolved

@dcheng - can you PTAL again?

File content/common/service_worker/race_network_request_write_buffer_manager.cc
Line 115, Patchset 4: MojoResult result = producer_->WriteAllData(base::as_bytes(buffer));
Daniel Cheng . resolved

Do we need to handle a failure result here and not increment the buffer size below?

Łukasz Anforowicz

Good catch. Yes, it seems that `num_bytes_written_` should stay the same if there was an error.

Open in Gerrit

Related details

Attention is currently required from:
  • Daniel Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 6
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 17:54:13 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Daniel Cheng (Gerrit)

unread,
Jun 24, 2024, 2:06:10 PM (5 days ago) Jun 24
to Łukasz Anforowicz, Daniel Cheng, Jeremy Roman, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org
Attention needed from Łukasz Anforowicz

Daniel Cheng voted

Code-Review+1
Owners-Override+1
Open in Gerrit

Related details

Attention is currently required from:
  • Łukasz Anforowicz
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 6
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Attention: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 18:05:59 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Łukasz Anforowicz (Gerrit)

unread,
Jun 24, 2024, 2:06:52 PM (5 days ago) Jun 24
to Daniel Cheng, Jeremy Roman, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org

Łukasz Anforowicz voted and added 1 comment

Votes added by Łukasz Anforowicz

Commit-Queue+2

1 comment

File mojo/public/cpp/system/data_pipe.h
Line 78, Patchset 4: }
Łukasz Anforowicz . resolved
Łukasz Anforowicz

Resolving...

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 6
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 18:06:38 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Łukasz Anforowicz <luk...@chromium.org>
satisfied_requirement
open
diffy

Łukasz Anforowicz (Gerrit)

unread,
Jun 24, 2024, 3:45:04 PM (5 days ago) Jun 24
to Daniel Cheng, Jeremy Roman, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org

Łukasz Anforowicz voted and added 1 comment

Votes added by Łukasz Anforowicz

Commit-Queue+2

1 comment

Patchset-level comments
File-level comment, Patchset 7 (Latest):
Łukasz Anforowicz . resolved

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.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 7
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
Gerrit-CC: Hiroki Nakagawa <nhi...@chromium.org>
Gerrit-CC: Jeremy Roman <jbr...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-CC: Simon Hangl <sim...@google.com>
Gerrit-CC: prerendering-reviews <prerenderi...@chromium.org>
Gerrit-Comment-Date: Mon, 24 Jun 2024 19:44:50 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Chromium LUCI CQ (Gerrit)

unread,
Jun 24, 2024, 3:57:41 PM (5 days ago) Jun 24
to Łukasz Anforowicz, Daniel Cheng, Jeremy Roman, Tricium, chromium...@chromium.org, Andrew Rayskiy, Kentaro Hara, Hiroki Nakagawa, prerendering-reviews, Simon Hangl, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, blundell+...@chromium.org, gavin...@chromium.org, horo+...@chromium.org, jsbell+ser...@chromium.org, kinuko+ser...@chromium.org, kinuko...@chromium.org, loading...@chromium.org, network-ser...@chromium.org, servicewor...@chromium.org, shimazu+se...@chromium.org, tburkar...@chromium.org, webauthn...@chromium.org

Chromium LUCI CQ submitted the change with unreviewed changes

Unreviewed changes

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
```

Change information

Commit message:
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
Bug: 40284755
Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Commit-Queue: Łukasz Anforowicz <luk...@chromium.org>
Reviewed-by: Daniel Cheng <dch...@chromium.org>
Owners-Override: Daniel Cheng <dch...@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1318748}
Files:
  • M chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
  • M components/openscreen_platform/tls_client_connection.cc
  • M components/openscreen_platform/tls_client_connection_unittest.cc
  • M content/browser/interest_group/interest_group_permissions_checker_unittest.cc
  • M content/browser/loader/cross_site_document_blocking_browsertest.cc
  • M content/browser/preloading/prefetch/prefetch_service_unittest.cc
  • M content/browser/preloading/prefetch/prefetch_streaming_url_loader_unittest.cc
  • M content/browser/preloading/prefetch/prefetch_url_loader_interceptor_unittest.cc
  • M content/browser/service_worker/service_worker_new_script_loader_unittest.cc
  • M content/browser/service_worker/service_worker_single_script_update_checker_unittest.cc
  • M content/browser/service_worker/service_worker_test_utils.cc
  • M content/browser/webkit_browsertest.cc
  • M content/common/service_worker/race_network_request_write_buffer_manager.cc
  • M content/common/service_worker/race_network_request_write_buffer_manager.h
  • M content/public/test/url_loader_interceptor.cc
  • M content/test/fake_network.cc
  • M device/fido/cable/websocket_adapter.cc
  • M device/fido/enclave/enclave_websocket_client.cc
  • M mojo/public/cpp/system/data_pipe.h
  • M services/network/tcp_socket_unittest.cc
  • M services/network/test/test_url_loader_factory.cc
  • M storage/browser/test/fake_blob_data_handle.cc
  • M third_party/blink/renderer/bindings/core/v8/script_streamer_test.cc
  • M third_party/blink/renderer/modules/direct_sockets/tcp_readable_stream_wrapper_unittest.cc
  • M third_party/blink/renderer/modules/webtransport/bidirectional_stream_test.cc
  • M third_party/blink/renderer/modules/webtransport/incoming_stream_test.cc
  • M third_party/blink/renderer/modules/webtransport/web_transport_test.cc
Change size: M
Delta: 27 files changed, 68 insertions(+), 146 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Daniel Cheng
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Iecb50c0b8aab0e8f72bd2eae814eb2b1a4e54e6c
Gerrit-Change-Number: 5646444
Gerrit-PatchSet: 8
Gerrit-Owner: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
Gerrit-Reviewer: Łukasz Anforowicz <luk...@chromium.org>
Gerrit-CC: Andrew Rayskiy <green...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages