Skip to content
This repository was archived by the owner on Aug 20, 2020. It is now read-only.
This repository was archived by the owner on Aug 20, 2020. It is now read-only.

Unfinished code in DesktopDragDropClientWayland::OnDragDrop #454

Open
@mcatanzaro

Description

@mcatanzaro

I made an error in DesktopDragDropClientWayland::OnDragDrop that I did not notice until after the code got committed. Kalyan noticed a race condition and asked me to fix it. I added a comment "Unlikely case" explaining the problem, and started writing some code to fix it, but promptly forgot; it got committed unfinished, oops. So the code under that comment basically does nothing. We need to add a way to wait until all the data has been received, and then call delegate_->OnPerformDrop, otherwise there is a race that could cause drops to fail if they contain huge amounts of data, or if the I/O is horrifically slow.

Ideally we would also add a test for this by faking the order that events are received in. desktop_drag_drop_client_aurax11_unittest.cc should provide inspiration.

(Not planning to fix this in the near future, I'm afraid; sorry for the error. Fortunately it's probably low-priority, as I doubt it would occur in practice.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions