Bug 226529 - HTMLMediaElement::virtualHasPendingActivity may keep objects alive unnecessarily
Summary: HTMLMediaElement::virtualHasPendingActivity may keep objects alive unnecessarily
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-06-02 01:26 PDT by youenn fablet
Modified: 2021-06-14 15:05 PDT (History)
17 users (show)

See Also:


Attachments
Patch (9.27 KB, patch)
2021-06-02 04:59 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (9.39 KB, patch)
2021-06-02 05:58 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch (8.93 KB, patch)
2021-06-02 08:27 PDT, youenn fablet
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2021-06-02 01:26:24 PDT
HTMLMediaElement::virtualHasPendingActivity may keep objects alive unnecessarily
Comment 1 youenn fablet 2021-06-02 01:27:31 PDT
<rdar://78726921>
Comment 2 youenn fablet 2021-06-02 01:28:05 PDT
https://jsfiddle.net/cpx73bry/ is an example where we are keeping the object alive for no good reasons.
Comment 3 youenn fablet 2021-06-02 04:59:58 PDT
Created attachment 430336 [details]
Patch
Comment 4 youenn fablet 2021-06-02 05:58:29 PDT
Created attachment 430340 [details]
Patch
Comment 5 Chris Dumez 2021-06-02 07:34:27 PDT
Comment on attachment 430340 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=430340&action=review

> LayoutTests/fast/mediastream/mediaElement-gc.html:41
> +promise_test(async (test) => {

New test is flaky on EWS:
- PASS GC a video element once its srcObject gets ended
+ FAIL GC a video element once its srcObject gets ended assert_less_than: expected a number less than 100 but got 100
Comment 6 youenn fablet 2021-06-02 08:26:19 PDT
(In reply to Chris Dumez from comment #5)
> Comment on attachment 430340 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=430340&action=review
> 
> > LayoutTests/fast/mediastream/mediaElement-gc.html:41
> > +promise_test(async (test) => {
> 
> New test is flaky on EWS:
> - PASS GC a video element once its srcObject gets ended
> + FAIL GC a video element once its srcObject gets ended assert_less_than:
> expected a number less than 100 but got 100

Hum, not sure why it fails, let's start with the main bug.
The ended MediaStream case can be fixed as a follow-up.
Comment 7 youenn fablet 2021-06-02 08:27:37 PDT
Created attachment 430359 [details]
Patch
Comment 8 EWS 2021-06-02 09:44:24 PDT
Committed r278359 (238391@main): <https://commits.webkit.org/238391@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430359 [details].
Comment 9 Truitt Savell 2021-06-14 15:05:18 PDT
It looks like the new test fast/mediastream/mediaElement-gc.html

added in https://trac.webkit.org/changeset/278359/webkit

has been a flaky failure on Mac sense introduction:
https://results.webkit.org/?suite=layout-tests&test=fast%2Fmediastream%2FmediaElement-gc.html

tracking in: https://bugs.webkit.org/show_bug.cgi?id=226991