Deleted some comments and cleaning up the code. CL formatted. [chromium/src : main]

0 views
Skip to first unread message

Guido Urdaneta (Gerrit)

unread,
Jul 2, 2024, 4:58:18 AMJul 2
to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Lucía Alonso Mozo

Guido Urdaneta added 16 comments

Patchset-level comments
File-level comment, Patchset 1 (Latest):
Guido Urdaneta . resolved

Some comments to start polishing `SerializedDataForMessageEvent`.

File third_party/blink/renderer/core/events/message_event.h
Line 223, Patchset 1 (Latest): bool iskDataTypeSerializedScriptValue = false;
Guido Urdaneta . unresolved

This field should be inside `SerializedDataForMessageEvent`, or maybe it shouldn't exist at all and can be a method in SDFME.

File third_party/blink/renderer/core/events/message_event.cc
Line 48, Patchset 1 (Latest):size_t MessageEvent::SizeOfExternalMemoryInBytes() {
Guido Urdaneta . unresolved

Remove this method.

Line 52, Patchset 1 (Latest):void MessageEvent::RegisterAmountOfExternallyAllocatedMemory() {
Guido Urdaneta . unresolved

Remove this method. Just make sure it's invoked in all constructors of SDFME

Line 56, Patchset 1 (Latest):void MessageEvent::UnregisterAmountOfExternallyAllocatedMemory() {
Guido Urdaneta . unresolved

Remove this method.
Just make sure it's invoked in the destructor of SDFME

Line 60, Patchset 1 (Latest):MessageEvent::MessageEvent() {
Guido Urdaneta . unresolved

Initialize `serialized_data_` with initializer.

Line 79, Patchset 1 (Latest): serialized_data_->dataAsV8Value().Set(initializer->data().GetIsolate(),
Guido Urdaneta . unresolved

This should be a single method `SetDataAsV8Value()` or maybe just `SetData()`

Line 105, Patchset 1 (Latest): serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>();
Guido Urdaneta . unresolved

Initialize with initializer.

Line 121, Patchset 1 (Latest): iskDataTypeSerializedScriptValue = true;
Guido Urdaneta . unresolved

Solve this without using this field.

Line 122, Patchset 1 (Latest): serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>(data);
Guido Urdaneta . unresolved

Initialize with initializer. Maybe you can move the call to SSV::Unpack to here and make the destructor receive an `UnpackedSerializedScriptValue*` if that helps get rid of the `iskData...` field.

Line 142, Patchset 1 (Latest): iskDataTypeSerializedScriptValue = true;
Guido Urdaneta . unresolved

Same comments here (initializer, remove field)

Line 152, Patchset 1 (Latest): serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>(true);
Guido Urdaneta . unresolved

Initialize with initializer. We might want a different way to signal that it's null. Maybe we can use static CreateXXX methods.

Line 205, Patchset 1 (Latest): serialized_data_->initMessageEvent(data);
Guido Urdaneta . unresolved

rename method to `InitWithScriptValue()`, or `SetDataAsScriptValue()` or just `SetData()`

Line 234, Patchset 1 (Latest): serialized_data_->initMessageEvent(data);
Guido Urdaneta . unresolved

Same comment

Line 258, Patchset 1 (Latest): serialized_data_->initMessageEvent(data);
Guido Urdaneta . unresolved

Similar comment

Line 269, Patchset 1 (Latest): return serialized_data_->data(script_state, message_ports);
Guido Urdaneta . unresolved

We probably want to rename the `data()` method to something like `DeserializeUsingPorts()` or just `Deserialize()`.

Open in Gerrit

Related details

Attention is currently required from:
  • Lucía Alonso Mozo
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 1
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Comment-Date: Tue, 02 Jul 2024 08:58:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Guido Urdaneta (Gerrit)

unread,
Jul 2, 2024, 6:29:28 AMJul 2
to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Lucía Alonso Mozo

Guido Urdaneta added 1 comment

File third_party/blink/renderer/core/events/message_event.cc
Line 269, Patchset 1 (Latest): return serialized_data_->data(script_state, message_ports);
Guido Urdaneta . unresolved

We probably want to rename the `data()` method to something like `DeserializeUsingPorts()` or just `Deserialize()`.

Guido Urdaneta

Just call the method `Deserialize()` and have it receive a `SerializedScriptValue::DeserializeOptions` as parameter.

Open in Gerrit

Related details

Attention is currently required from:
  • Lucía Alonso Mozo
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 1
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Comment-Date: Tue, 02 Jul 2024 10:29:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lucía Alonso Mozo (Gerrit)

unread,
Jul 2, 2024, 7:37:45 AMJul 2
to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Guido Urdaneta

Lucía Alonso Mozo added 15 comments

File third_party/blink/renderer/core/events/message_event.h
Line 223, Patchset 1: bool iskDataTypeSerializedScriptValue = false;
Guido Urdaneta . resolved

This field should be inside `SerializedDataForMessageEvent`, or maybe it shouldn't exist at all and can be a method in SDFME.

Lucía Alonso Mozo

Done

File third_party/blink/renderer/core/events/message_event.cc
Line 48, Patchset 1:size_t MessageEvent::SizeOfExternalMemoryInBytes() {
Guido Urdaneta . resolved

Remove this method.

Lucía Alonso Mozo

Done

Line 52, Patchset 1:void MessageEvent::RegisterAmountOfExternallyAllocatedMemory() {
Guido Urdaneta . resolved

Remove this method. Just make sure it's invoked in all constructors of SDFME

Lucía Alonso Mozo

Done

Line 56, Patchset 1:void MessageEvent::UnregisterAmountOfExternallyAllocatedMemory() {
Guido Urdaneta . resolved

Remove this method.
Just make sure it's invoked in the destructor of SDFME

Lucía Alonso Mozo

Done

Line 60, Patchset 1:MessageEvent::MessageEvent() {
Guido Urdaneta . resolved

Initialize `serialized_data_` with initializer.

Lucía Alonso Mozo

Done

Line 79, Patchset 1: serialized_data_->dataAsV8Value().Set(initializer->data().GetIsolate(),
Guido Urdaneta . resolved

This should be a single method `SetDataAsV8Value()` or maybe just `SetData()`

Lucía Alonso Mozo

Done

Line 105, Patchset 1: serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>();
Guido Urdaneta . resolved

Initialize with initializer.

Lucía Alonso Mozo

Done

Line 121, Patchset 1: iskDataTypeSerializedScriptValue = true;
Guido Urdaneta . resolved

Solve this without using this field.

Lucía Alonso Mozo

Done

Line 122, Patchset 1: serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>(data);
Guido Urdaneta . resolved

Initialize with initializer. Maybe you can move the call to SSV::Unpack to here and make the destructor receive an `UnpackedSerializedScriptValue*` if that helps get rid of the `iskData...` field.

Lucía Alonso Mozo

Done

Line 142, Patchset 1: iskDataTypeSerializedScriptValue = true;
Guido Urdaneta . resolved

Same comments here (initializer, remove field)

Lucía Alonso Mozo

Done

Line 152, Patchset 1: serialized_data_ = MakeGarbageCollected<SerializedDataForMessageEvent>(true);
Guido Urdaneta . resolved

Initialize with initializer. We might want a different way to signal that it's null. Maybe we can use static CreateXXX methods.

Lucía Alonso Mozo

Done

Line 205, Patchset 1: serialized_data_->initMessageEvent(data);
Guido Urdaneta . resolved

rename method to `InitWithScriptValue()`, or `SetDataAsScriptValue()` or just `SetData()`

Lucía Alonso Mozo

As we also use this method to init the message event where data is a String and not just a Script value, I'm going to call it SetData().

Line 234, Patchset 1: serialized_data_->initMessageEvent(data);
Guido Urdaneta . resolved

Same comment

Lucía Alonso Mozo

Done

Line 258, Patchset 1: serialized_data_->initMessageEvent(data);
Guido Urdaneta . unresolved

Similar comment

Lucía Alonso Mozo

Why do we need the ScriptState::Current(isolate))?

Line 269, Patchset 1: return serialized_data_->data(script_state, message_ports);
Guido Urdaneta . resolved

We probably want to rename the `data()` method to something like `DeserializeUsingPorts()` or just `Deserialize()`.

Guido Urdaneta

Just call the method `Deserialize()` and have it receive a `SerializedScriptValue::DeserializeOptions` as parameter.

Lucía Alonso Mozo

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Guido Urdaneta
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 2
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
Gerrit-Comment-Date: Tue, 02 Jul 2024 11:37:25 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Guido Urdaneta (Gerrit)

unread,
Jul 2, 2024, 11:35:38 PMJul 2
to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Lucía Alonso Mozo

Guido Urdaneta added 5 comments

File third_party/blink/renderer/core/workers/dedicated_worker.cc
Line 207, Patchset 2 (Latest): PostMessageOptions* options = PostMessageOptions::Create();
Guido Urdaneta . unresolved

Use `StructuredSerializedOptions` instead of `PostMessageOptions`.

Line 215, Patchset 2 (Latest):void DedicatedWorker::PostEvent(
Guido Urdaneta . unresolved

Merge this into the other version of `PostEvent`. Change it to receive `StructuredSerializedOptions*` instead of `PostMessageOptions*`.

Line 243, Patchset 2 (Latest): ->StoreCurrentStackTrace("Worker.postMessage");
Guido Urdaneta . unresolved

rename this to `"Worker.PostEventWithData"`

Line 248, Patchset 2 (Latest): // TRACE_EVENT_INSTANT(
Guido Urdaneta . unresolved

uncomment this.

Line 249, Patchset 2 (Latest): // "devtools.timeline", "SchedulePostMessage", "data",
Guido Urdaneta . unresolved

Rename this to `SchedulePostEventWithData`

Open in Gerrit

Related details

Attention is currently required from:
  • Lucía Alonso Mozo
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 2
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Comment-Date: Wed, 03 Jul 2024 03:35:28 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Lucía Alonso Mozo (Gerrit)

unread,
Jul 3, 2024, 3:44:30 AMJul 3
to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Guido Urdaneta

Lucía Alonso Mozo added 1 comment

File third_party/blink/renderer/core/events/message_event.cc
Line 258, Patchset 1: serialized_data_->initMessageEvent(data);
Guido Urdaneta . resolved

Similar comment

Lucía Alonso Mozo

Why do we need the ScriptState::Current(isolate))?

Lucía Alonso Mozo

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Guido Urdaneta
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 2
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
Gerrit-Comment-Date: Wed, 03 Jul 2024 07:44:19 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
Comment-In-Reply-To: Lucía Alonso Mozo <alons...@google.com>
satisfied_requirement
unsatisfied_requirement
open
diffy

Lucía Alonso Mozo (Gerrit)

unread,
Jul 3, 2024, 3:54:56 AMJul 3
to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Guido Urdaneta

Lucía Alonso Mozo added 5 comments

File third_party/blink/renderer/core/workers/dedicated_worker.cc
Line 207, Patchset 2: PostMessageOptions* options = PostMessageOptions::Create();
Guido Urdaneta . resolved

Use `StructuredSerializedOptions` instead of `PostMessageOptions`.

Lucía Alonso Mozo

Done

Line 215, Patchset 2:void DedicatedWorker::PostEvent(
Guido Urdaneta . resolved

Merge this into the other version of `PostEvent`. Change it to receive `StructuredSerializedOptions*` instead of `PostMessageOptions*`.

Lucía Alonso Mozo

Done

Line 243, Patchset 2: ->StoreCurrentStackTrace("Worker.postMessage");
Guido Urdaneta . resolved

rename this to `"Worker.PostEventWithData"`

Lucía Alonso Mozo

Done

Line 248, Patchset 2: // TRACE_EVENT_INSTANT(
Guido Urdaneta . resolved

uncomment this.

Lucía Alonso Mozo

Done

Line 249, Patchset 2: // "devtools.timeline", "SchedulePostMessage", "data",
Guido Urdaneta . resolved

Rename this to `SchedulePostEventWithData`

Lucía Alonso Mozo

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Guido Urdaneta
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not 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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
Gerrit-Change-Number: 5666713
Gerrit-PatchSet: 3
Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
Gerrit-CC: Kentaro Hara <har...@chromium.org>
Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
Gerrit-Comment-Date: Wed, 03 Jul 2024 07:54:46 +0000
satisfied_requirement
unsatisfied_requirement
open
diffy

Guido Urdaneta (Gerrit)

unread,
Jul 3, 2024, 12:45:33 PMJul 3
to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
Attention needed from Lucía Alonso Mozo

Guido Urdaneta added 10 comments

File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
Line 54, Patchset 5 (Latest): void RegisterAmountOfExternallyAllocatedMemory();
Guido Urdaneta . unresolved

These can be private

Line 52, Patchset 5 (Latest): size_t SizeOfExternalMemoryInBytes();
Guido Urdaneta . unresolved

This one can probably be private

File third_party/blink/renderer/core/events/message_event.h
Line 226, Patchset 5 (Latest): // size_t amount_of_external_memory_ = 0;
Guido Urdaneta . unresolved

remove this commented line

Line 165, Patchset 5 (Latest): bool IsDataDirty() const { return serialized_data_->IsDataDirty(); }
Guido Urdaneta . unresolved

It looks like this method is not used at all. If that's the case, delete it and also any other methods changed to delegate to SDFE that are not used anymore.

File third_party/blink/renderer/core/workers/dedicated_worker.cc
Line 218, Patchset 5 (Latest):void DedicatedWorker::PostEventWithData(
Guido Urdaneta . unresolved

Remove this one and merge it to the other one.

File third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h
Line 160, Patchset 5 (Latest): // DEFINE_ATTRIBUTE_EVENT_LISTENER(rtctransform, kRtctransform)
Guido Urdaneta . unresolved

Delete this commented line

File third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl
Line 51, Patchset 5 (Latest): // attribute EventHandler onrtctransform;
Guido Urdaneta . unresolved

delete commented line

File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
Line 173, Patchset 5 (Latest): CrossThreadFunction<Event*(ScriptState* script_state)> error_callback,
Guido Urdaneta . unresolved

rename to `event_factory_error_callback` (It's also an event factory).
Apply to other places that receive this callback.

File third_party/blink/renderer/core/workers/worker_global_scope.cc
Line 613, Patchset 5 (Latest): CrossThreadFunction<Event*(ScriptState* script_state,
Guido Urdaneta . unresolved

Remove the names for the parameters inside the callback type to avoid confusion with the actual parameter names of `ReceiveEventWithData`.
Do it in other places that receive the callback too.

File third_party/blink/renderer/modules/peerconnection/dedicated_worker_global_scope_rtc_transform.idl
Line 2, Patchset 5 (Latest):ImplementedAs=DedicatedWorkerGlobalScopeRTCTransform
Guido Urdaneta . unresolved

What name do you need to use if you don't use ImplementedAs?

Open in Gerrit

Related details

Attention is currently required from:
  • Lucía Alonso Mozo
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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
    Gerrit-Change-Number: 5666713
    Gerrit-PatchSet: 5
    Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Comment-Date: Wed, 03 Jul 2024 16:45:24 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lucía Alonso Mozo (Gerrit)

    unread,
    Jul 4, 2024, 7:30:47 AMJul 4
    to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
    Attention needed from Guido Urdaneta

    Lucía Alonso Mozo added 9 comments

    File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
    Line 54, Patchset 5 (Latest): void RegisterAmountOfExternallyAllocatedMemory();
    Guido Urdaneta . resolved

    These can be private

    Lucía Alonso Mozo

    Done

    Line 52, Patchset 5 (Latest): size_t SizeOfExternalMemoryInBytes();
    Guido Urdaneta . resolved

    This one can probably be private

    Lucía Alonso Mozo

    Done

    File third_party/blink/renderer/core/events/message_event.h
    Line 226, Patchset 5 (Latest): // size_t amount_of_external_memory_ = 0;
    Guido Urdaneta . resolved

    remove this commented line

    Lucía Alonso Mozo

    Done

    Line 165, Patchset 5 (Latest): bool IsDataDirty() const { return serialized_data_->IsDataDirty(); }
    Guido Urdaneta . resolved

    It looks like this method is not used at all. If that's the case, delete it and also any other methods changed to delegate to SDFE that are not used anymore.

    Lucía Alonso Mozo
    If I delete it, I get this comment: gen/third_party/blink/renderer/bindings/core/v8/v8_message_event.cc:102:22: error: no member named 'IsDataDirty' in 'blink::MessageEvent'
    102 | if (!blink_receiver->IsDataDirty()) {

    It's being used from JS.

    File third_party/blink/renderer/core/workers/dedicated_worker.cc
    Line 218, Patchset 5 (Latest):void DedicatedWorker::PostEventWithData(
    Guido Urdaneta . resolved

    Remove this one and merge it to the other one.

    Lucía Alonso Mozo

    Done

    File third_party/blink/renderer/core/workers/dedicated_worker_global_scope.h
    Line 160, Patchset 5 (Latest): // DEFINE_ATTRIBUTE_EVENT_LISTENER(rtctransform, kRtctransform)
    Guido Urdaneta . resolved

    Delete this commented line

    Lucía Alonso Mozo

    Done

    File third_party/blink/renderer/core/workers/dedicated_worker_global_scope.idl
    Line 51, Patchset 5 (Latest): // attribute EventHandler onrtctransform;
    Guido Urdaneta . resolved

    delete commented line

    Lucía Alonso Mozo

    Done

    File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
    Line 173, Patchset 5 (Latest): CrossThreadFunction<Event*(ScriptState* script_state)> error_callback,
    Guido Urdaneta . resolved

    rename to `event_factory_error_callback` (It's also an event factory).
    Apply to other places that receive this callback.

    Lucía Alonso Mozo

    Done

    File third_party/blink/renderer/core/workers/worker_global_scope.cc
    Line 613, Patchset 5 (Latest): CrossThreadFunction<Event*(ScriptState* script_state,
    Guido Urdaneta . resolved

    Remove the names for the parameters inside the callback type to avoid confusion with the actual parameter names of `ReceiveEventWithData`.
    Do it in other places that receive the callback too.

    Lucía Alonso Mozo

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guido Urdaneta
    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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
    Gerrit-Change-Number: 5666713
    Gerrit-PatchSet: 5
    Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
    Gerrit-Comment-Date: Thu, 04 Jul 2024 11:30:37 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lucía Alonso Mozo (Gerrit)

    unread,
    Jul 4, 2024, 7:54:20 AMJul 4
    to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
    Attention needed from Guido Urdaneta

    Lucía Alonso Mozo added 1 comment

    File third_party/blink/renderer/modules/peerconnection/dedicated_worker_global_scope_rtc_transform.idl
    Line 2, Patchset 5:ImplementedAs=DedicatedWorkerGlobalScopeRTCTransform
    Guido Urdaneta . unresolved

    What name do you need to use if you don't use ImplementedAs?

    Lucía Alonso Mozo

    Couldn't find the name so I'm going to leave it with the implemented as.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guido Urdaneta
    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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
    Gerrit-Change-Number: 5666713
    Gerrit-PatchSet: 6
    Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
    Gerrit-Comment-Date: Thu, 04 Jul 2024 11:54:12 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Lucía Alonso Mozo (Gerrit)

    unread,
    Jul 4, 2024, 8:44:16 AMJul 4
    to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
    Attention needed from Guido Urdaneta and Lucía Alonso Mozo

    Lucía Alonso Mozo voted and added 1 comment

    Votes added by Lucía Alonso Mozo

    Commit-Queue+1

    1 comment

    File third_party/blink/renderer/modules/peerconnection/dedicated_worker_global_scope_rtc_transform.idl
    Line 2, Patchset 5:ImplementedAs=DedicatedWorkerGlobalScopeRTCTransform
    Guido Urdaneta . resolved

    What name do you need to use if you don't use ImplementedAs?

    Lucía Alonso Mozo

    Couldn't find the name so I'm going to leave it with the implemented as.

    Lucía Alonso Mozo

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Guido Urdaneta
    • Lucía Alonso Mozo
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not 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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
    Gerrit-Change-Number: 5666713
    Gerrit-PatchSet: 6
    Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
    Gerrit-CC: Kentaro Hara <har...@chromium.org>
    Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
    Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
    Gerrit-Comment-Date: Thu, 04 Jul 2024 12:44:08 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Guido Urdaneta (Gerrit)

    unread,
    Jul 4, 2024, 9:39:07 AMJul 4
    to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
    Attention needed from Lucía Alonso Mozo

    Guido Urdaneta added 9 comments

    File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
    Line 94, Patchset 6 (Latest): size_t SizeOfExternalMemoryInBytes();
    Guido Urdaneta . unresolved

    Declare methods before fields.

    File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.cc
    Line 57, Patchset 6 (Latest):void SerializedDataForEvent::SetData(const String& data) {
    Guido Urdaneta . unresolved

    You have to add tests for this method (see that the lines are orange).

    Line 172, Patchset 6 (Latest): return false;
    Guido Urdaneta . unresolved

    Try to add a test that exercises this branch

    Line 212, Patchset 6 (Latest): case kDataTypeBlob:
    Guido Urdaneta . unresolved

    Try to add tests that exercise these branches

    File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event_test.cc
    Line 28, Patchset 6 (Latest): Member<SerializedDataForEvent> serialized_data_ =
    Guido Urdaneta . unresolved

    Can't use Member as local variable. Use `SerializedDataForEvent*`. Fix everywhere.

    Line 41, Patchset 6 (Latest): MakeGarbageCollected<SerializedDataForEvent>(nullptr);
    Guido Urdaneta . unresolved

    Use the `CreateNull` static method which automatically also exercises the constructor

    Line 51, Patchset 6 (Latest): // Check empty constructor
    Guido Urdaneta . unresolved

    remove comment

    Line 76, Patchset 6 (Latest): scoped_refptr<SerializedScriptValue> serializedScriptValue =
    Guido Urdaneta . unresolved

    why 2 serialized_script_values? also, this is not the right naming style for variables.

    File third_party/blink/renderer/core/workers/dedicated_worker.cc
    Line 213, Patchset 6 (Latest): DCHECK(!GetExecutionContext() || GetExecutionContext()->IsContextThread());
    Guido Urdaneta . unresolved

    Move these checks to the beginning.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Lucía Alonso Mozo
    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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
      Gerrit-Change-Number: 5666713
      Gerrit-PatchSet: 6
      Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
      Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
      Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
      Gerrit-Comment-Date: Thu, 04 Jul 2024 13:38:57 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Lucía Alonso Mozo (Gerrit)

      unread,
      Jul 4, 2024, 10:50:47 AMJul 4
      to Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
      Attention needed from Guido Urdaneta

      Lucía Alonso Mozo added 9 comments

      File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
      Line 94, Patchset 6 (Latest): size_t SizeOfExternalMemoryInBytes();
      Guido Urdaneta . resolved

      Declare methods before fields.

      Lucía Alonso Mozo

      Done

      File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.cc
      Line 57, Patchset 6 (Latest):void SerializedDataForEvent::SetData(const String& data) {
      Guido Urdaneta . resolved

      You have to add tests for this method (see that the lines are orange).

      Lucía Alonso Mozo

      Done

      Guido Urdaneta . resolved

      Try to add a test that exercises this branch

      Lucía Alonso Mozo

      Done

      Line 212, Patchset 6 (Latest): case kDataTypeBlob:
      Guido Urdaneta . resolved

      Try to add tests that exercise these branches

      Lucía Alonso Mozo

      For next iteration.

      File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event_test.cc
      Line 28, Patchset 6 (Latest): Member<SerializedDataForEvent> serialized_data_ =
      Guido Urdaneta . resolved

      Can't use Member as local variable. Use `SerializedDataForEvent*`. Fix everywhere.

      Lucía Alonso Mozo

      Done

      Line 41, Patchset 6 (Latest): MakeGarbageCollected<SerializedDataForEvent>(nullptr);
      Guido Urdaneta . resolved

      Use the `CreateNull` static method which automatically also exercises the constructor

      Lucía Alonso Mozo

      Done

      Line 51, Patchset 6 (Latest): // Check empty constructor
      Guido Urdaneta . resolved

      remove comment

      Lucía Alonso Mozo

      Done

      Line 76, Patchset 6 (Latest): scoped_refptr<SerializedScriptValue> serializedScriptValue =
      Guido Urdaneta . resolved

      why 2 serialized_script_values? also, this is not the right naming style for variables.

      Lucía Alonso Mozo

      Done

      File third_party/blink/renderer/core/workers/dedicated_worker.cc
      Line 213, Patchset 6 (Latest): DCHECK(!GetExecutionContext() || GetExecutionContext()->IsContextThread());
      Guido Urdaneta . resolved

      Move these checks to the beginning.

      Lucía Alonso Mozo

      Done

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Guido Urdaneta
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not 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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
      Gerrit-Change-Number: 5666713
      Gerrit-PatchSet: 6
      Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
      Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
      Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
      Gerrit-CC: Kentaro Hara <har...@chromium.org>
      Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
      Gerrit-Comment-Date: Thu, 04 Jul 2024 14:50:39 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Guido Urdaneta (Gerrit)

      unread,
      Jul 5, 2024, 7:58:51 AMJul 5
      to Lucía Alonso Mozo, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
      Attention needed from Lucía Alonso Mozo

      Guido Urdaneta added 1 comment

      File third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transform_test.cc
      Line 69, Patchset 8 (Latest): HeapVector<ScriptValue> transfer = {};
      Guido Urdaneta . unresolved

      I think you need to add `script_value` to transfer to indicate that you are transferring (not copying) script_value.

      Also, you should probably use something other than an event. It would look confusing that you're going to fire an event that has an event as data/options.
      Use some other type. Try all possibilities (null, integer, string, some other complex type that is transferable).

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Lucía Alonso Mozo
      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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
        Gerrit-Change-Number: 5666713
        Gerrit-PatchSet: 8
        Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-Comment-Date: Fri, 05 Jul 2024 11:58:42 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Guido Urdaneta (Gerrit)

        unread,
        Jul 9, 2024, 9:10:15 AM (13 days ago) Jul 9
        to Lucía Alonso Mozo, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
        Attention needed from Lucía Alonso Mozo

        Guido Urdaneta added 2 comments

        File third_party/blink/renderer/core/workers/worker_global_scope.cc
        Line 630, Patchset 15 (Latest): } else if (message.message && message.message->CanDeserializeIn(this)) {
        Guido Urdaneta . unresolved

        at this point message.message is guaranteed to not be null, so you can remove that.

        File third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transform_test.cc
        Line 5, Patchset 15 (Latest):#include "third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transform.h"
        Guido Urdaneta . unresolved

        As discussed offline, let's remove these tests and just use the more comprehensive JS tests.

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Lucía Alonso Mozo
        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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
        Gerrit-Change-Number: 5666713
        Gerrit-PatchSet: 15
        Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-Comment-Date: Tue, 09 Jul 2024 13:10:06 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Lucía Alonso Mozo (Gerrit)

        unread,
        Jul 9, 2024, 10:09:46 AM (13 days ago) Jul 9
        to Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
        Attention needed from Guido Urdaneta

        Lucía Alonso Mozo voted and added 3 comments

        Votes added by Lucía Alonso Mozo

        Commit-Queue+1

        3 comments

        File third_party/blink/renderer/core/workers/worker_global_scope.cc
        Line 630, Patchset 15: } else if (message.message && message.message->CanDeserializeIn(this)) {
        Guido Urdaneta . resolved

        at this point message.message is guaranteed to not be null, so you can remove that.

        Lucía Alonso Mozo

        Done

        File third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transform_test.cc
        Line 5, Patchset 15:#include "third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transform.h"
        Guido Urdaneta . resolved

        As discussed offline, let's remove these tests and just use the more comprehensive JS tests.

        Lucía Alonso Mozo

        Done

        Line 69, Patchset 8: HeapVector<ScriptValue> transfer = {};
        Guido Urdaneta . resolved

        I think you need to add `script_value` to transfer to indicate that you are transferring (not copying) script_value.

        Also, you should probably use something other than an event. It would look confusing that you're going to fire an event that has an event as data/options.
        Use some other type. Try all possibilities (null, integer, string, some other complex type that is transferable).

        Lucía Alonso Mozo

        Done

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Guido Urdaneta
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not 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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
        Gerrit-Change-Number: 5666713
        Gerrit-PatchSet: 15
        Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
        Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
        Gerrit-CC: Kentaro Hara <har...@chromium.org>
        Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
        Gerrit-Comment-Date: Tue, 09 Jul 2024 14:09:35 +0000
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Guido Urdaneta (Gerrit)

        unread,
        Jul 9, 2024, 6:44:18 PM (13 days ago) Jul 9
        to Lucía Alonso Mozo, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
        Attention needed from Lucía Alonso Mozo

        Guido Urdaneta added 11 comments

        File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
        Line 29, Patchset 17 (Latest):class CORE_EXPORT SerializedDataForEvent
        Guido Urdaneta . unresolved

        This file (and the corresponding .cc ones) should be in core/events

        File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.cc
        Line 172, Patchset 17 (Latest): return false;
        Guido Urdaneta . unresolved

        Add test coverage to this path

        File third_party/blink/renderer/core/events/message_event.cc
        Line 261, Patchset 17 (Latest): return serialized_data_->IsLockedToAgentCluster(locked_to_agent_cluster_);
        Guido Urdaneta . unresolved

        The `if (locked_to_agent_cluster_)` line should stay.

        Line 282, Patchset 17 (Latest): locked_to_agent_cluster_ = true;
        Guido Urdaneta . unresolved

        Do you need to forward this to SerializeData?

        Line 290, Patchset 17 (Latest): serialized_data_->AssociateWithWrapper(isolate, wrapper);
        Guido Urdaneta . unresolved

        remind me to double-check about the proper way to pass `wrapper` around

        File third_party/blink/renderer/core/workers/dedicated_worker.cc
        Line 207, Patchset 17 (Latest): ExceptionState& exception_state) {
        Guido Urdaneta . unresolved

        We should cover all this with unit tests. Didn't you have them?

        File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
        Line 181, Patchset 17 (Latest): EventWithDataInfo data;
        Guido Urdaneta . unresolved

        Find a way to reliably cover this with tests.
        PostMessageToWorkerGlobalScope version has this covered, so it should be possible to follow the same pattern.

        Line 258, Patchset 17 (Latest): PostCrossThreadTask(
        Guido Urdaneta . unresolved

        Same here, but I guess covering the previous one will cover this one as well.

        File third_party/blink/renderer/core/workers/worker_global_scope.cc
        Line 627, Patchset 17 (Latest): Event* event = event_factory_callback.Run(
        Guido Urdaneta . unresolved

        Add coverage to this path

        Line 628, Patchset 17 (Latest): ScriptController()->GetScriptState(), nullptr);
        Guido Urdaneta . unresolved

        Add `/*param_name=*/` comment before nullptr

        File third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transformer.cc
        Line 63, Patchset 17 (Latest): ScriptPromise<IDLUndefined> promise = EmptyPromise();
        Guido Urdaneta . unresolved

        Can this be done in a single line, without a temporary variable?
        Also applies to `generateKeyFrame()`

        Open in Gerrit

        Related details

        Attention is currently required from:
        • Lucía Alonso Mozo
        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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 17
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Comment-Date: Tue, 09 Jul 2024 22:44:08 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Lucía Alonso Mozo (Gerrit)

          unread,
          Jul 10, 2024, 8:58:21 AM (12 days ago) Jul 10
          to Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Guido Urdaneta and Lucía Alonso Mozo

          Lucía Alonso Mozo voted and added 9 comments

          Votes added by Lucía Alonso Mozo

          Commit-Queue+1

          9 comments

          File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.h
          Line 29, Patchset 17:class CORE_EXPORT SerializedDataForEvent
          Guido Urdaneta . resolved

          This file (and the corresponding .cc ones) should be in core/events

          Lucía Alonso Mozo

          Talked on Google Chat that it's better to do move it to core/workers.

          File third_party/blink/renderer/bindings/core/v8/serialization/serialized_data_for_event.cc
          Line 172, Patchset 17: return false;
          Guido Urdaneta . resolved

          Add test coverage to this path

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/events/message_event.cc
          Line 261, Patchset 17: return serialized_data_->IsLockedToAgentCluster(locked_to_agent_cluster_);
          Guido Urdaneta . resolved

          The `if (locked_to_agent_cluster_)` line should stay.

          Lucía Alonso Mozo

          Done

          Line 261, Patchset 18 (Latest): if (locked_to_agent_cluster_) {
          Lucía Alonso Mozo . unresolved

          do I add a test for this? they didn't have one before and it's not really code that I implemented.

          Line 282, Patchset 17: locked_to_agent_cluster_ = true;
          Guido Urdaneta . resolved

          Do you need to forward this to SerializeData?

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
          Line 258, Patchset 17: PostCrossThreadTask(
          Guido Urdaneta . unresolved

          Same here, but I guess covering the previous one will cover this one as well.

          Lucía Alonso Mozo

          they also don't cover this part of the tests? (in the for(auto& task: tasks))

          File third_party/blink/renderer/core/workers/worker_global_scope.cc
          Line 627, Patchset 17: Event* event = event_factory_callback.Run(
          Guido Urdaneta . resolved

          Add coverage to this path

          Lucía Alonso Mozo

          Done

          Line 628, Patchset 17: ScriptController()->GetScriptState(), nullptr);
          Guido Urdaneta . resolved

          Add `/*param_name=*/` comment before nullptr

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/modules/peerconnection/rtc_rtp_script_transformer.cc
          Line 63, Patchset 17: ScriptPromise<IDLUndefined> promise = EmptyPromise();
          Guido Urdaneta . resolved

          Can this be done in a single line, without a temporary variable?
          Also applies to `generateKeyFrame()`

          Lucía Alonso Mozo

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guido Urdaneta
          • Lucía Alonso Mozo
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 18
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Comment-Date: Wed, 10 Jul 2024 12:58:10 +0000
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Lucía Alonso Mozo (Gerrit)

          unread,
          Jul 11, 2024, 8:09:49 AM (11 days ago) Jul 11
          to Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Guido Urdaneta

          Lucía Alonso Mozo added 3 comments

          File third_party/blink/renderer/core/workers/dedicated_worker.cc
          Line 207, Patchset 17: ExceptionState& exception_state) {
          Guido Urdaneta . resolved

          We should cover all this with unit tests. Didn't you have them?

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
          Line 181, Patchset 17: EventWithDataInfo data;
          Guido Urdaneta . resolved

          Find a way to reliably cover this with tests.
          PostMessageToWorkerGlobalScope version has this covered, so it should be possible to follow the same pattern.

          Lucía Alonso Mozo

          Done

          Line 258, Patchset 17: PostCrossThreadTask(
          Guido Urdaneta . resolved

          Same here, but I guess covering the previous one will cover this one as well.

          Lucía Alonso Mozo

          they also don't cover this part of the tests? (in the for(auto& task: tasks))

          Lucía Alonso Mozo

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guido Urdaneta
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 19
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Comment-Date: Thu, 11 Jul 2024 12:09:40 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Guido Urdaneta (Gerrit)

          unread,
          Jul 12, 2024, 10:38:00 AM (10 days ago) Jul 12
          to Lucía Alonso Mozo, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Lucía Alonso Mozo

          Guido Urdaneta added 11 comments

          Patchset-level comments
          File-level comment, Patchset 21 (Latest):
          Guido Urdaneta . resolved

          Haven't reviewed everything, but some comments here.

          File third_party/blink/renderer/core/events/message_event.cc
          Line 261, Patchset 18: if (locked_to_agent_cluster_) {
          Lucía Alonso Mozo . unresolved

          do I add a test for this? they didn't have one before and it's not really code that I implemented.

          Guido Urdaneta

          Yes, please.
          You need at least a test for SerializedDataForEvent

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
          Line 107, Patchset 21 (Latest): struct EventWithDataInfo {
          Guido Urdaneta . unresolved

          Rename

          File third_party/blink/renderer/core/workers/dedicated_worker_test.cc
          Line 489, Patchset 21 (Latest):void CreateWaitForEvent(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . unresolved

          Rename this function to `WaitForMessageOrMessageErrorEvent`.

          Line 489, Patchset 21 (Latest):void CreateWaitForEvent(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . unresolved

          Put all these utility functions in an unnamed namespace at the top.

          Line 491, Patchset 21 (Latest): WTF::CrossThreadOnceClosure quit_1,
          Guido Urdaneta . unresolved

          rename `quit_1` to `listeners_registered_closure`
          rename `quit_2` to `event_fired_closure`.

          Line 509, Patchset 21 (Latest): Event* event = MakeGarbageCollected<MessageEvent>("data", "origin");
          Guido Urdaneta . unresolved

          You should create an event that uses `data` so that you can verify in the test that `data` is passed correctly.
          And update a test to verify that.

          Line 518, Patchset 21 (Latest):TEST_F(DedicatedWorkerTest, DispatchEventWithDataOnWorkerGlobalScope) {
          Guido Urdaneta . unresolved

          Move the new tests to the end of the file

          Line 604, Patchset 21 (Latest): base::RunLoop run_loop_1;
          Guido Urdaneta . unresolved

          The whole code with the 2 RunLoops and the waits looks reusable across tests.

          Line 686, Patchset 21 (Latest):bool OverrideCanSerialize(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . unresolved

          Move to unnamed namespace at the top.

          Line 776, Patchset 21 (Latest):ScriptValue CreateScriptValue(ScriptState* script_state) {
          Guido Urdaneta . unresolved

          Move utility functions to unnamed namespace at the top

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Lucía Alonso Mozo
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 21
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Comment-Date: Fri, 12 Jul 2024 14:37:49 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Lucía Alonso Mozo <alons...@google.com>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          gwsq (Gerrit)

          unread,
          Jul 12, 2024, 11:44:48 AM (10 days ago) Jul 12
          to Lucía Alonso Mozo, Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Lucía Alonso Mozo

          Message from gwsq

          Warning: gwsq did not assign any reviewers.

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Lucía Alonso Mozo
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 21
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Comment-Date: Fri, 12 Jul 2024 15:44:37 +0000
          Gerrit-HasComments: No
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Lucía Alonso Mozo (Gerrit)

          unread,
          Jul 15, 2024, 9:53:06 AM (7 days ago) Jul 15
          to Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Guido Urdaneta

          Lucía Alonso Mozo added 10 comments

          File third_party/blink/renderer/core/events/message_event.cc
          Line 261, Patchset 18: if (locked_to_agent_cluster_) {
          Lucía Alonso Mozo . resolved

          do I add a test for this? they didn't have one before and it's not really code that I implemented.

          Guido Urdaneta

          Yes, please.
          You need at least a test for SerializedDataForEvent

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
          Line 107, Patchset 21: struct EventWithDataInfo {
          Guido Urdaneta . unresolved

          Rename

          Lucía Alonso Mozo

          CustomEventInfo

          File third_party/blink/renderer/core/workers/dedicated_worker_test.cc
          Line 489, Patchset 21:void CreateWaitForEvent(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . resolved

          Put all these utility functions in an unnamed namespace at the top.

          Lucía Alonso Mozo

          it can't be at the top because some definitions are after. I moved it the more top I could.

          Line 489, Patchset 21:void CreateWaitForEvent(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . resolved

          Rename this function to `WaitForMessageOrMessageErrorEvent`.

          Lucía Alonso Mozo

          Done

          Line 491, Patchset 21: WTF::CrossThreadOnceClosure quit_1,
          Guido Urdaneta . resolved

          rename `quit_1` to `listeners_registered_closure`
          rename `quit_2` to `event_fired_closure`.

          Lucía Alonso Mozo

          Done

          Line 509, Patchset 21: Event* event = MakeGarbageCollected<MessageEvent>("data", "origin");
          Guido Urdaneta . resolved

          You should create an event that uses `data` so that you can verify in the test that `data` is passed correctly.
          And update a test to verify that.

          Lucía Alonso Mozo

          Done

          Line 518, Patchset 21:TEST_F(DedicatedWorkerTest, DispatchEventWithDataOnWorkerGlobalScope) {
          Guido Urdaneta . resolved

          Move the new tests to the end of the file

          Lucía Alonso Mozo

          Done

          Line 604, Patchset 21: base::RunLoop run_loop_1;
          Guido Urdaneta . resolved

          The whole code with the 2 RunLoops and the waits looks reusable across tests.

          Lucía Alonso Mozo

          Done

          Line 686, Patchset 21:bool OverrideCanSerialize(DedicatedWorkerThreadForTest* worker_thread,
          Guido Urdaneta . resolved

          Move to unnamed namespace at the top.

          Lucía Alonso Mozo

          Done

          Line 776, Patchset 21:ScriptValue CreateScriptValue(ScriptState* script_state) {
          Guido Urdaneta . resolved

          Move utility functions to unnamed namespace at the top

          Lucía Alonso Mozo

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guido Urdaneta
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 22
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Comment-Date: Mon, 15 Jul 2024 13:52:53 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          Comment-In-Reply-To: Guido Urdaneta <gui...@chromium.org>
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Guido Urdaneta (Gerrit)

          unread,
          Jul 15, 2024, 12:19:28 PM (7 days ago) Jul 15
          to Lucía Alonso Mozo, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Lucía Alonso Mozo

          Guido Urdaneta added 27 comments

          File third_party/blink/renderer/core/workers/dedicated_worker.h
          Line 95, Patchset 23 (Latest): void PostEventWithData(
          Guido Urdaneta . unresolved

          Let's rename to PostCustomEvent

          File third_party/blink/renderer/core/workers/dedicated_worker.cc
          Line 234, Patchset 23 (Latest): ->StoreCurrentStackTrace("Worker.PostEventWithData");
          Guido Urdaneta . unresolved

          PostCustomEvent

          Line 241, Patchset 23 (Latest): "devtools.timeline", "SchedulePostEventWithData", "data",
          Guido Urdaneta . unresolved

          SchedulePostCustomEvent

          Line 246, Patchset 23 (Latest): perfetto::Flow::Global(trace_id)); // SchedulePostEventWithData
          Guido Urdaneta . unresolved

          SchedulePostCustomEvent

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
          Line 181, Patchset 23 (Latest): EventWithDataInfo data;
          Guido Urdaneta . unresolved

          You can intialize in place

          File third_party/blink/renderer/core/workers/dedicated_worker_object_proxy.h
          Line 71, Patchset 23 (Latest): void ProcessEventWithDataFromWorkerObject(
          Guido Urdaneta . unresolved

          rename to ProcessCustomEventFromWorkerObject

          File third_party/blink/renderer/core/workers/dedicated_worker_test.cc
          Line 313, Patchset 23 (Latest):Event* CreateEventWithDataNoMessage(ScriptState* script_state,
          Guido Urdaneta . unresolved

          Rename to CreateMessageEvent.

          Line 315, Patchset 23 (Latest): Event* event = MakeGarbageCollected<MessageEvent>("noMessage", "origin");
          Guido Urdaneta . unresolved

          Is there a Create() method variant you can use?

          Line 318, Patchset 23 (Latest):Event* CreateErrorEvent(ScriptState* script_state) {
          Guido Urdaneta . unresolved

          Rename to CreateMessageErrorEvent

          Line 322, Patchset 23 (Latest):Event* CreateEventWithData(ScriptState* script_state,
          Guido Urdaneta . unresolved

          Rename to CreateMessageEventWithData

          Line 330, Patchset 23 (Latest):void WaitForMessageOrMessageErrorEvent(
          Guido Urdaneta . unresolved

          Rename to `RegisterMessageEventListener`

          Line 334, Patchset 23 (Latest): WTF::CrossThreadOnceClosure listeners_registered_closure,
          Guido Urdaneta . unresolved

          rename to `listener_registered_closure`

          Line 335, Patchset 23 (Latest): WTF::CrossThreadOnceClosure event_fired_closure) {
          Guido Urdaneta . unresolved

          rename to `event_listener`

          Line 342, Patchset 23 (Latest): WTF::CrossThreadOnceClosure quit_closure) {
          Guido Urdaneta . unresolved

          rename this to `event_listener_closure` or just `event_listener`.

          Line 355, Patchset 23 (Latest): EXPECT_EQ(execution_context, worker_thread->GlobalScope());
          Guido Urdaneta . unresolved

          Normally it's better to have expectations in the tests themselves, so probably better to re-inline this.

          Line 366, Patchset 23 (Latest):CreateCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . unresolved

          Receive a `base::RepeatingClosure quit_closure` instead of the RunLoop.

          Invoke the quit_closure instead of `run_loop.Quit()`.

          From the tests, pass `run_loop.QuitClosure()` instead of the `run_loop`.

          Line 366, Patchset 23 (Latest):CreateCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . unresolved

          Rename to `CreateCallbackForPostCustomEvent`

          Line 375, Patchset 23 (Latest):CreateErrorCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . unresolved

          Rename to `CreateErrorCallbackForPostCustomEvent`

          Line 518, Patchset 23 (Latest):void DedicatedWorkerTest::CreateAndPostMessage(WaitForEvent** wait) {
          Guido Urdaneta . unresolved

          You can define this inside the class.

          Line 518, Patchset 23 (Latest):void DedicatedWorkerTest::CreateAndPostMessage(WaitForEvent** wait) {
          Guido Urdaneta . unresolved

          WaitForEvent should be an input, not an output.
          It should be created by the tests and pass via a single pointer.

          However, see other message below about `CreateAndPostMessage()`

          Line 551, Patchset 23 (Latest): CreateAndPostMessage(&wait);
          Guido Urdaneta . unresolved

          I see that `CreateAndPostMessage()` is used only by existing tests.
          Probably better to revert if you're not using it in new tests.

          Line 559, Patchset 23 (Latest): CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . unresolved

          Use `base::OnceCallback`, since this function is not called across threads (i.e., with `PostCrossThreadTask`).

          You can use BindLambdaForTesting directly (no need to wrap in a CrossThreadFunction).

          Line 559, Patchset 23 (Latest): CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . unresolved

          handle_event_callback is an input, so it should be first.
          You can remove `event_type` since it's included in `event`

          Line 559, Patchset 23 (Latest): CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . unresolved

          rename `handle_event_callback` to `post_event_callback` since it is this callback what actually posts the event. Nothing else in this function posts an event in the worker.

          Line 600, Patchset 23 (Latest): CreateAndDispatchEvent(&event, &event_type, std::move(handle_event_callback));
          Guido Urdaneta . unresolved

          You can pass the callback inline ( no need for a single-use variable). And no need to wrap in CrossThreadFunction if you use base::OnceCallback (or base::RepeatingCallback)

          Line 686, Patchset 23 (Latest): CreateAndDispatchEvent(&event, &event_type, std::move(handle_event_callback));
          Guido Urdaneta . unresolved

          You can create the callback directly in the call (and if you switch to `base::OnceCallback`, you shouldn't need to wrap in a `CrossThreadFunction`.

          Line 691, Patchset 23 (Latest):TEST_F(DedicatedWorkerTest, postEventWithData) {
          Guido Urdaneta . unresolved

          These should start with uppercase

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Lucía Alonso Mozo
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 23
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Comment-Date: Mon, 15 Jul 2024 16:19:16 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Lucía Alonso Mozo (Gerrit)

          unread,
          Jul 16, 2024, 8:18:54 AM (6 days ago) Jul 16
          to AyeAye, Tricium, Guido Urdaneta, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Guido Urdaneta

          Lucía Alonso Mozo added 29 comments

          File third_party/blink/renderer/core/events/message_event.cc
          Line 290, Patchset 17: serialized_data_->AssociateWithWrapper(isolate, wrapper);
          Guido Urdaneta . resolved

          remind me to double-check about the proper way to pass `wrapper` around

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker.h
          Line 95, Patchset 23: void PostEventWithData(
          Guido Urdaneta . resolved

          Let's rename to PostCustomEvent

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker.cc
          Line 234, Patchset 23: ->StoreCurrentStackTrace("Worker.PostEventWithData");
          Guido Urdaneta . resolved

          PostCustomEvent

          Lucía Alonso Mozo

          Done

          Line 241, Patchset 23: "devtools.timeline", "SchedulePostEventWithData", "data",
          Guido Urdaneta . resolved

          SchedulePostCustomEvent

          Lucía Alonso Mozo

          Done

          Line 246, Patchset 23: perfetto::Flow::Global(trace_id)); // SchedulePostEventWithData
          Guido Urdaneta . resolved

          SchedulePostCustomEvent

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.h
          Line 107, Patchset 21: struct EventWithDataInfo {
          Guido Urdaneta . resolved

          Rename

          Lucía Alonso Mozo

          CustomEventInfo

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_messaging_proxy.cc
          Line 181, Patchset 23: EventWithDataInfo data;
          Guido Urdaneta . resolved

          You can intialize in place

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_object_proxy.h
          Line 71, Patchset 23: void ProcessEventWithDataFromWorkerObject(
          Guido Urdaneta . resolved

          rename to ProcessCustomEventFromWorkerObject

          Lucía Alonso Mozo

          Done

          File third_party/blink/renderer/core/workers/dedicated_worker_test.cc
          Line 313, Patchset 23:Event* CreateEventWithDataNoMessage(ScriptState* script_state,
          Guido Urdaneta . resolved

          Rename to CreateMessageEvent.

          Lucía Alonso Mozo

          Done

          Line 315, Patchset 23: Event* event = MakeGarbageCollected<MessageEvent>("noMessage", "origin");
          Guido Urdaneta . resolved

          Is there a Create() method variant you can use?

          Lucía Alonso Mozo

          Done

          Line 318, Patchset 23:Event* CreateErrorEvent(ScriptState* script_state) {
          Guido Urdaneta . resolved

          Rename to CreateMessageErrorEvent

          Lucía Alonso Mozo

          Done

          Line 322, Patchset 23:Event* CreateEventWithData(ScriptState* script_state,
          Guido Urdaneta . resolved

          Rename to CreateMessageEventWithData

          Lucía Alonso Mozo

          Done

          Line 330, Patchset 23:void WaitForMessageOrMessageErrorEvent(
          Guido Urdaneta . resolved

          Rename to `RegisterMessageEventListener`

          Lucía Alonso Mozo

          Done

          Line 334, Patchset 23: WTF::CrossThreadOnceClosure listeners_registered_closure,
          Guido Urdaneta . resolved

          rename to `listener_registered_closure`

          Lucía Alonso Mozo

          Done

          Line 335, Patchset 23: WTF::CrossThreadOnceClosure event_fired_closure) {
          Guido Urdaneta . resolved

          rename to `event_listener`

          Lucía Alonso Mozo

          Done

          Line 342, Patchset 23: WTF::CrossThreadOnceClosure quit_closure) {
          Guido Urdaneta . resolved

          rename this to `event_listener_closure` or just `event_listener`.

          Lucía Alonso Mozo

          Done

          Line 355, Patchset 23: EXPECT_EQ(execution_context, worker_thread->GlobalScope());
          Guido Urdaneta . resolved

          Normally it's better to have expectations in the tests themselves, so probably better to re-inline this.

          Lucía Alonso Mozo

          Done

          Line 366, Patchset 23:CreateCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . resolved

          Rename to `CreateCallbackForPostCustomEvent`

          Lucía Alonso Mozo

          Done

          Line 366, Patchset 23:CreateCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . resolved

          Receive a `base::RepeatingClosure quit_closure` instead of the RunLoop.

          Invoke the quit_closure instead of `run_loop.Quit()`.

          From the tests, pass `run_loop.QuitClosure()` instead of the `run_loop`.

          Lucía Alonso Mozo

          Not sure how to pass it

          Line 375, Patchset 23:CreateErrorCallbackForPostEventWithData(base::RunLoop& run_loop) {
          Guido Urdaneta . resolved

          Rename to `CreateErrorCallbackForPostCustomEvent`

          Lucía Alonso Mozo

          Done

          Line 518, Patchset 23:void DedicatedWorkerTest::CreateAndPostMessage(WaitForEvent** wait) {
          Guido Urdaneta . resolved

          WaitForEvent should be an input, not an output.
          It should be created by the tests and pass via a single pointer.

          However, see other message below about `CreateAndPostMessage()`

          Lucía Alonso Mozo

          I deleted the function because of the other comment.

          Line 518, Patchset 23:void DedicatedWorkerTest::CreateAndPostMessage(WaitForEvent** wait) {
          Guido Urdaneta . resolved

          You can define this inside the class.

          Lucía Alonso Mozo

          Done

          Line 551, Patchset 23: CreateAndPostMessage(&wait);
          Guido Urdaneta . resolved

          I see that `CreateAndPostMessage()` is used only by existing tests.
          Probably better to revert if you're not using it in new tests.

          Lucía Alonso Mozo

          Done

          Line 559, Patchset 23: CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . resolved

          rename `handle_event_callback` to `post_event_callback` since it is this callback what actually posts the event. Nothing else in this function posts an event in the worker.

          Lucía Alonso Mozo

          Done

          Line 559, Patchset 23: CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . resolved

          Use `base::OnceCallback`, since this function is not called across threads (i.e., with `PostCrossThreadTask`).

          You can use BindLambdaForTesting directly (no need to wrap in a CrossThreadFunction).

          Lucía Alonso Mozo

          Done

          Line 559, Patchset 23: CrossThreadFunction<void(BlinkTransferableMessage)> handle_event_callback) {
          Guido Urdaneta . resolved

          handle_event_callback is an input, so it should be first.
          You can remove `event_type` since it's included in `event`

          Lucía Alonso Mozo

          Done

          Line 600, Patchset 23: CreateAndDispatchEvent(&event, &event_type, std::move(handle_event_callback));
          Guido Urdaneta . resolved

          You can pass the callback inline ( no need for a single-use variable). And no need to wrap in CrossThreadFunction if you use base::OnceCallback (or base::RepeatingCallback)

          Lucía Alonso Mozo

          Done

          Line 686, Patchset 23: CreateAndDispatchEvent(&event, &event_type, std::move(handle_event_callback));
          Guido Urdaneta . resolved

          You can create the callback directly in the call (and if you switch to `base::OnceCallback`, you shouldn't need to wrap in a `CrossThreadFunction`.

          Lucía Alonso Mozo

          Done

          Line 691, Patchset 23:TEST_F(DedicatedWorkerTest, postEventWithData) {
          Guido Urdaneta . resolved

          These should start with uppercase

          Lucía Alonso Mozo

          Done

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Guido Urdaneta
          Submit Requirements:
          • requirement satisfiedCode-Coverage
          • requirement is not 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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
          Gerrit-Change-Number: 5666713
          Gerrit-PatchSet: 24
          Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
          Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
          Gerrit-CC: Kentaro Hara <har...@chromium.org>
          Gerrit-CC: gwsq
          Gerrit-Attention: Guido Urdaneta <gui...@chromium.org>
          Gerrit-Comment-Date: Tue, 16 Jul 2024 12:18:43 +0000
          Gerrit-HasComments: Yes
          Gerrit-Has-Labels: No
          satisfied_requirement
          unsatisfied_requirement
          open
          diffy

          Guido Urdaneta (Gerrit)

          unread,
          Jul 16, 2024, 8:58:59 AM (6 days ago) Jul 16
          to Lucía Alonso Mozo, AyeAye, Tricium, Chromium LUCI CQ, chromium...@chromium.org, Kentaro Hara, kinuko...@chromium.org, blink-revie...@chromium.org, blink-...@chromium.org, blink-work...@chromium.org, horo+...@chromium.org, jbroma...@chromium.org, jmedle...@chromium.org, kinuko...@chromium.org, shimazu...@chromium.org, video-networking...@google.com
          Attention needed from Lucía Alonso Mozo

          Guido Urdaneta added 1 comment

          File third_party/blink/renderer/platform/runtime_enabled_features.json5
          Line 3432, Patchset 25 (Latest): name: "RTCRtpEncodedTransforms",
          Guido Urdaneta . unresolved

          Rename to RTCRtpScriptTransform

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Lucía Alonso Mozo
          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: Ic3e19cb5d012d1332c458167483e518f6e2128b9
            Gerrit-Change-Number: 5666713
            Gerrit-PatchSet: 25
            Gerrit-Owner: Lucía Alonso Mozo <alons...@google.com>
            Gerrit-Reviewer: Lucía Alonso Mozo <alons...@google.com>
            Gerrit-CC: Guido Urdaneta <gui...@chromium.org>
            Gerrit-CC: Kentaro Hara <har...@chromium.org>
            Gerrit-CC: gwsq
            Gerrit-Attention: Lucía Alonso Mozo <alons...@google.com>
            Gerrit-Comment-Date: Tue, 16 Jul 2024 12:58:45 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            satisfied_requirement
            unsatisfied_requirement
            open
            diffy
            Reply all
            Reply to author
            Forward
            0 new messages