Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: backport patch for leaking HTML5 video elements #19347

Merged
merged 1 commit into from Jul 19, 2019

Conversation

MarshallOfSound
Copy link
Member

Backports https://chromium-review.googlesource.com/c/chromium/src/+/1677053 to 4-2-x to fix a rather noticeable memory leak when removing HTML5 video elements from the DOM

Notes: Fixed memory leak when removing HTML5 video elements from the DOM with Javascript

@MarshallOfSound MarshallOfSound added the fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases label Jul 19, 2019
@MarshallOfSound MarshallOfSound requested a review from a team as a code owner July 19, 2019 18:27
Copy link
Member

@codebytere codebytere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarshallOfSound it looks like some things got altered orthogonal to this patch:

see these changes

@MarshallOfSound
Copy link
Member Author

@codebytere Those changes are due to the different versions of git folks have on their machines (namely me and @nornagon have different git versions) we fixed this in the patch scripts in more recent branches (I think 6-0-x and above). The changes are ok 👍

Copy link
Contributor

@jkleinsc jkleinsc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MarshallOfSound while those additional changes may have no effect, they are confusing. Can't you just bring in the changes to .patches and the new mediacontrols_disconnect_observers_when_controls_are_hidden.patch file?

@MarshallOfSound
Copy link
Member Author

I just ran git-export-patches. I'd rather avoid manually editing patch files by hand or picking and choosing.

@jkleinsc
Copy link
Contributor

@MarshallOfSound I get that but couldn't you be selective on what files you commit?

@MarshallOfSound
Copy link
Member Author

@jkleinsc those hunks generate the sha that my newly added patch is based off of. It might work, but it might not. Id rather just take the output of git-export-patches.

@MarshallOfSound
Copy link
Member Author

test failures look video related, I'll take a look

@MarshallOfSound
Copy link
Member Author

@jkleinsc @codebytere Tests are fixed, should be All Clear now. Needed to handle a nullptr case that the original CL did not as Chromium has removed legacy media inputs in C75, we still have them in C69 👍

@codebytere
Copy link
Member

Approving given added context above!

@codebytere codebytere requested a review from jkleinsc July 19, 2019 21:16
@deepak1556
Copy link
Member

Needed to handle a nullptr case that the original CL did not as Chromium has removed legacy media inputs in C75, we still have them in C69

Can you share the CL that changed this ? I am concerned that volume_slider_ is expected to be non-null and while it doesn't. There are other locations in the code where they null protect against volume_slider_.

Did you try running with --enable-features=UseModernMediaControls to check if its the legacy controls thats causing this difference ?

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I don't have context on the media code changes, so can't assert for the nullptr check introduced additionally. Besides nullptr check is not gonna cause trouble here anyways.

@MarshallOfSound MarshallOfSound merged commit 0b0f7ed into 4-2-x Jul 19, 2019
@release-clerk
Copy link

release-clerk bot commented Jul 19, 2019

Release Notes Persisted

Fixed memory leak when removing HTML5 video elements from the DOM with Javascript

@MarshallOfSound MarshallOfSound deleted the fix-video-leak branch July 19, 2019 22:19
@peteringram0
Copy link

@MarshallOfSound Does this also fix the following bug: #18019 ? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fast-track 🚅 Indicates that this PR is intended to bypass the 24 hour rule. Needs approval from Releases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants