| Code-Review | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
absl::Overload{[&](content::RenderFrameHost* rfh) {no need for capture-all here and below, just `[]`.
socket_options->allow_address_sharing_for_multicast =nit: might as well go with
`socket_options->allow_address_sharing_for_multicast = options->multicast_allow_address_sharing.value_or(false)` and ditch the conditional for readability (ditto below)
#include "third_party/blink/renderer/platform/heap/member.h"also unused.
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h"unused?
#include "third_party/blink/renderer/bindings/core/v8/script_promise_property.h"unused?
#include "third_party/blink/renderer/bindings/core/v8/frozen_array.h"unused?
#include "third_party/blink/renderer/bindings/core/v8/script_promise_property.h"unused
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"redundant.
#include "third_party/blink/renderer/platform/heap/persistent.h"unused
#include "third_party/blink/renderer/platform/wtf/forward.h"remove?
exception_state.ThrowTypeError(Should this be `ThrowSyntaxError()`?
exception_state.ThrowTypeError(nit: I didn't check what the spec is, but a more appropriate exception would be a [state error](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/bindings/exception_code.h;l=43;drc=391e98eeaee80326c3a9d9e9dd731570dba0981a) here.
exception_state.ThrowTypeError("Cannot join the same group again");This looks like a state error too.
// TODO(crbug.com/398934282): join the group. For now promise never resolves.FWIW, it will also trigger a DCECK() upon unsettled promise being GC'ed. You would need to suppress this using `SuppressDetachCheck()`
exception_state.ThrowTypeError(invalid state?
exception_state.ThrowTypeError("Cannot leave group which is not joined");ditto
socket_options->multicast_time_to_live = options->multicastTimeToLive();here and below, assign unconditionally?
if (options->hasMulticastAllowAddressSharing()) {ditto
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
no need for capture-all here and below, just `[]`.
Done
socket_options->allow_address_sharing_for_multicast =nit: might as well go with
`socket_options->allow_address_sharing_for_multicast = options->multicast_allow_address_sharing.value_or(false)` and ditch the conditional for readability (ditto below)
I'd rather leave it like to be an empty value, to be consistent with other parameters.
#include "third_party/blink/renderer/platform/heap/member.h"Vlad Krotalso unused.
Yes, thanks!
#include "third_party/blink/renderer/platform/heap/collection_support/heap_hash_set.h"Vlad Krotunused?
Yes, thanks!
#include "third_party/blink/renderer/bindings/core/v8/script_promise_property.h"Vlad Krotunused?
Yes, thanks!
#include "third_party/blink/renderer/bindings/core/v8/frozen_array.h"Vlad Krotunused?
Yes, thanks!
#include "third_party/blink/renderer/bindings/core/v8/script_promise_property.h"Vlad Krotunused
Yes, thanks!
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"Vlad Krotredundant.
Done
#include "third_party/blink/renderer/platform/heap/persistent.h"Vlad Krotunused
Done
#include "third_party/blink/renderer/platform/wtf/forward.h"Vlad Krotremove?
Needed for WTF::String
Should this be `ThrowSyntaxError()`?
For example URL() throws TypeError
https://developer.mozilla.org/en-US/docs/Web/API/URL/URL
nit: no else after return.
Done
nit: I didn't check what the spec is, but a more appropriate exception would be a [state error](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/bindings/exception_code.h;l=43;drc=391e98eeaee80326c3a9d9e9dd731570dba0981a) here.
Agree. Fixed.
exception_state.ThrowTypeError("Cannot join the same group again");This looks like a state error too.
Done
// TODO(crbug.com/398934282): join the group. For now promise never resolves.FWIW, it will also trigger a DCECK() upon unsettled promise being GC'ed. You would need to suppress this using `SuppressDetachCheck()`
This part is removed already.
exception_state.ThrowTypeError(Vlad Krotinvalid state?
Fixed
exception_state.ThrowTypeError("Cannot leave group which is not joined");Vlad Krotditto
Done
socket_options->multicast_time_to_live = options->multicastTimeToLive();here and below, assign unconditionally?
I would rather leave as it is let the socket know these params were not specified.
if (options->hasMulticastAllowAddressSharing()) {Vlad Krotditto
Acknowledged
| 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. |
| Code-Review | +1 |
[&](base::WeakPtr<SharedWorkerHost> shared_worker) {remove this capture-all too
[&](base::WeakPtr<ServiceWorkerVersion> service_worker) {and this one
enum class State { kOpen, kClosed };nit: move down to the rest of `private` (classes should generally start with `public` section)
#include "net/base/ip_address.h"unused
#include "third_party/blink/renderer/platform/wtf/forward.h"Vlad Krotremove?
Needed for WTF::String
For WTF::String you should include `third_party/blink/renderer/platform/wtf/text/wtf_string.h` instead. This only gives you a forward declaration, and given you actually use string operations here and it compiles, you're likely relying on transitive includes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[&](base::WeakPtr<SharedWorkerHost> shared_worker) {Vlad Krotremove this capture-all too
Done
[&](base::WeakPtr<ServiceWorkerVersion> service_worker) {Vlad Krotand this one
Done
nit: move down to the rest of `private` (classes should generally start with `public` section)
Done
#include "net/base/ip_address.h"Vlad Krotunused
Done
#include "third_party/blink/renderer/platform/wtf/forward.h"Vlad Krotremove?
Andrey KosyakovNeeded for WTF::String
For WTF::String you should include `third_party/blink/renderer/platform/wtf/text/wtf_string.h` instead. This only gives you a forward declaration, and given you actually use string operations here and it compiles, you're likely relying on transitive includes.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
5 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:
```
The name of the file: content/browser/direct_sockets/direct_sockets_service_impl.cc
Insertions: 2, Deletions: 2.
@@ -169,11 +169,11 @@
// permission policy
return true;
},
- [&](base::WeakPtr<SharedWorkerHost> shared_worker) {
+ [](base::WeakPtr<SharedWorkerHost> shared_worker) {
// TODO(crbug.com/398934282): add shared worker support.
return false;
},
- [&](base::WeakPtr<ServiceWorkerVersion> service_worker) {
+ [](base::WeakPtr<ServiceWorkerVersion> service_worker) {
// TODO(crbug.com/398934282): add dedicated worker
// support.
return false;
```
```
The name of the file: third_party/blink/renderer/modules/direct_sockets/multicast_controller.cc
Insertions: 1, Deletions: 2.
@@ -7,12 +7,11 @@
#include <optional>
#include "net/base/ip_address.h"
-#include "net/base/net_errors.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
-#include "third_party/blink/renderer/platform/wtf/forward.h"
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
```
```
The name of the file: third_party/blink/renderer/modules/direct_sockets/multicast_controller.h
Insertions: 3, Deletions: 3.
@@ -5,7 +5,6 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_DIRECT_SOCKETS_MULTICAST_CONTROLLER_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_DIRECT_SOCKETS_MULTICAST_CONTROLLER_H_
-#include "net/base/ip_address.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/execution_context/execution_context_lifecycle_observer.h"
@@ -13,6 +12,7 @@
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
namespace blink {
// MulticastController interface from multicast_controller.idl
@@ -25,8 +25,6 @@
public ExecutionContextClient {
DEFINE_WRAPPERTYPEINFO();
- enum class State { kOpen, kClosed };
-
public:
explicit MulticastController(ExecutionContext*);
@@ -53,6 +51,8 @@
const Vector<String>& joinedGroups() const { return joined_groups_; }
private:
+ enum class State { kOpen, kClosed };
+
Vector<String> joined_groups_;
State state_ = State::kOpen;
```
Reland "Multicast support in Direct Sockets #1"
This is a reland of commit ca80fdde7bdd64ec6a3baf615bcc473b2ecfe5d1
Some tests were failing on Fuchsia. Made sure direct sockets tests are
not run on fuchsia.
Original change's description:
> Multicast support in Direct Sockets #1
>
> This CL adds IDL files for Multicast and necessary parameters to
> UDPSocketOptions. Not everything is in place yet. cover: 1. Permission
> Policy 2. Communication with real socket via mojo 3. Usage histograms 4.
> Workers support 5. WPT tests (possibly).
>
> Explainer
> https://github.com/explainers-by-googlers/multicast-in-direct-sockets.
> Chrome Entry https://chromestatus.com/feature/5073740211814400 Intent to
> prototype
> https://groups.google.com/a/chromium.org/g/blink-dev/c/ADV4FZtN4nE
>
> The functionality is gated behind a blink flag MulticastInDirectSockets.
>
> Bug: 398934282
> Change-Id: I57e7b982269b176e29657d07f69d838e016ad55f
> Low-Coverage-Reason: TESTS_IN_SEPARATE_CL
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6894978
> Commit-Queue: Vlad Krot <vk...@google.com>
> Reviewed-by: Camille Lamy <cl...@chromium.org>
> Reviewed-by: Andrew Rayskiy <green...@google.com>
> Cr-Commit-Position: refs/heads/main@{#1509508}
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |