| Commit-Queue | +1 |
Please review:
active_script_wrappable_creation_key.h, DEPS
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
IPC: cl...@chromium.org
📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).
IPC reviewer(s): cl...@chromium.org
Reviewer source(s):
cl...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// TODO(@vkrot) check the necessary permission policyThe standard TODO format is (here and elsewhere):
`// TODO(crbug.com/<...>): ...`
Window MulticastInDirectSockets,Since the flag is the same, you can simply do
```
RuntimeEnabled=MulticastInDirectSockets,
Exposed=(Window, DedicatedWorker)
```
MulticastController multicastController;hide this behind runtime enabled?
boolean multicastAllowAddressSharing;Hide these behind runtime enabled
WeakMember<MulticastController> weak_multicast_controller_;I'd make this a normal `Member`; this way you won't need to mark the controller as ActiveWrappable (I presume).
You might also be able to get this from `openInfo`?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
// TODO(@vkrot) check the necessary permission policyThe standard TODO format is (here and elsewhere):
`// TODO(crbug.com/<...>): ...`
Done
Since the flag is the same, you can simply do
```
RuntimeEnabled=MulticastInDirectSockets,
Exposed=(Window, DedicatedWorker)
```
Done
hide this behind runtime enabled?
Yes, good idea
Hide these behind runtime enabled
Done
WeakMember<MulticastController> weak_multicast_controller_;I'd make this a normal `Member`; this way you won't need to mark the controller as ActiveWrappable (I presume).
You might also be able to get this from `openInfo`?
ActiveScriptWrappable is necessary to prevent collection of this object while joining/leaving groups is in process, to fire callback for the user when operations ended, because what if socket and multicast controller are both collected.
Technically, nothing bad will happen, because the socket resources will be released, but the user won't receive callback.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
WeakMember<MulticastController> weak_multicast_controller_;Vlad KrotI'd make this a normal `Member`; this way you won't need to mark the controller as ActiveWrappable (I presume).
You might also be able to get this from `openInfo`?
ActiveScriptWrappable is necessary to prevent collection of this object while joining/leaving groups is in process, to fire callback for the user when operations ended, because what if socket and multicast controller are both collected.
Technically, nothing bad will happen, because the socket resources will be released, but the user won't receive callback.
I'd argue that if the socket object is already dead, then the multicast pipe will most likely also be dead, nah?
WeakMember<MulticastController> weak_multicast_controller_;Vlad KrotI'd make this a normal `Member`; this way you won't need to mark the controller as ActiveWrappable (I presume).
You might also be able to get this from `openInfo`?
Andrew RayskiyActiveScriptWrappable is necessary to prevent collection of this object while joining/leaving groups is in process, to fire callback for the user when operations ended, because what if socket and multicast controller are both collected.
Technically, nothing bad will happen, because the socket resources will be released, but the user won't receive callback.
I'd argue that if the socket object is already dead, then the multicast pipe will most likely also be dead, nah?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (options->multicast_allow_address_sharing.has_value()) {Sanity check: does it make sense for any of these options to be present while the others aren't? If not, would it make sense to package all the multicast options as a single struct to have this struct be the optional memebers in the mojom struct, instead of having a list of individual optionals?
// Default is false.nit: this seems a bit weird for an optional value. Do you mean something like by default this is not present unless the user of the API wants to use multicast. In this case we will have a value, and this value will be false, unless the user of the API uses special configuration option. If so, maybe update the comment.
Similar nit for multicast_loopback below.
// When the object dies, it does not leave groups, because the socket closureCould you precise which object you are referring to? It's not clear whether it is the MulticastController, or the object that requested to join groups. It would also be nice to reference the exact name of the class and function you mean by "the socket closure will do it".
Also, the comment seems to suggest that the MulticastController is only kept alive by having pending join/leave requests, and when it doesn't have them anymore it is destroyed. Except that it is a member of UDPSocket, so its lifetime should be the UDPSocket lifetime instead (which makes more sense). Could you update the comment so that it is clearer?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (options->multicast_allow_address_sharing.has_value()) {Sanity check: does it make sense for any of these options to be present while the others aren't? If not, would it make sense to package all the multicast options as a single struct to have this struct be the optional memebers in the mojom struct, instead of having a list of individual optionals?
does it make sense for any of these options to be present while the others aren't?
nit: this seems a bit weird for an optional value. Do you mean something like by default this is not present unless the user of the API wants to use multicast. In this case we will have a value, and this value will be false, unless the user of the API uses special configuration option. If so, maybe update the comment.
Similar nit for multicast_loopback below.
changed wording
// When the object dies, it does not leave groups, because the socket closureCould you precise which object you are referring to? It's not clear whether it is the MulticastController, or the object that requested to join groups. It would also be nice to reference the exact name of the class and function you mean by "the socket closure will do it".
Also, the comment seems to suggest that the MulticastController is only kept alive by having pending join/leave requests, and when it doesn't have them anymore it is destroyed. Except that it is a member of UDPSocket, so its lifetime should be the UDPSocket lifetime instead (which makes more sense). Could you update the comment so that it is clearer?
Thanks for the observation. I have changed lifetime of MulticastController, but forgot to update the comment.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
if (options->multicast_allow_address_sharing.has_value()) {Vlad KrotSanity check: does it make sense for any of these options to be present while the others aren't? If not, would it make sense to package all the multicast options as a single struct to have this struct be the optional memebers in the mojom struct, instead of having a list of individual optionals?
does it make sense for any of these options to be present while the others aren't?
- Yes, makes sense. Every option can be present independently. For example, multicast_time_to_live is used for sending datagrams.
- allow_address_sharing_for_multicast - to be able to bind to the same port multiple times. They are independent.
Acknowledged
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::optional<net::IPAddress> CreateAndCheckIpAddress(I'd move this to a `.cc` anon namespace
void OnJoinedGroup(ScriptPromiseResolver<IDLUndefined>* resolver,These three methods do not make sense without a proper impl imo. Shall we move them to a follow-up?
Same for promises
enum class State { kOpen, kClosed, kAborted };Do we really care about the aborted/closed states?
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::optional<net::IPAddress> CreateAndCheckIpAddress(I'd move this to a `.cc` anon namespace
Good idea!
void OnJoinedGroup(ScriptPromiseResolver<IDLUndefined>* resolver,These three methods do not make sense without a proper impl imo. Shall we move them to a follow-up?
Same for promises
Yea, we can do that.
Do we really care about the aborted/closed states?
| 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 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
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.
| 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. |