Closed Bug 1626794 Opened 5 years ago Closed 5 years ago

Make Animation::CommitStyles safer

Categories

(Core :: DOM: Animation, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: alaskanemily, Assigned: alaskanemily)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There are two main issues with Animation::CommitStyles.
1: Animation::CommitStyles calls Document::FlushPendingNotifications which means that it should have the MOZ_CAN_RUN_SCRIPT annotation.
2: It doesn't explicitly account for the possibility that flushing the document could destroy the document.

For 2 it's currently safe because it holds a strong reference to the element and checks for a null prescontext before applying styles, but how it's currently implemented it could b easy to miss this case when modifying the function.

Flags: needinfo?(emcdonough)
No longer blocks: 1626793
Priority: -- → P3

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is P3 (Backlog,) indicating it has been triaged, the bug's Severity is being updated to S3 (normal.)

Severity: normal → S3
Assignee: nobody → emcdonough
Status: NEW → ASSIGNED
Flags: needinfo?(emcdonough)
Pushed by emcdonough@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1ec3a730a72f Add strong ref to document and MOZ_CAN_RUN_SCRIPT annotation to Animation::CommitStyles r=hiro
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: