Changeset 277379 in webkit
- Timestamp:
- May 12, 2021, 11:00:23 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
html/HTMLMediaElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r277378 r277379 1 2021-05-12 Jer Noble <jer.noble@apple.com> 2 3 HTMLMediaElement::mediaLoadingFailedFatally() does direct dispatch of events; should enqueue 4 https://bugs.webkit.org/show_bug.cgi?id=225700 5 <rdar://75576322> 6 7 Reviewed by Eric Carlson. 8 9 In r274559, an update was made to mediaLoadingFailedFatally to adopt recent spec changes, and as 10 part of that change, an "error" event was changed from being enqueued to being directly dispatched. 11 However, directly dispatching events exposes the element to JS and has the potential to cause the 12 element to be garbage collected, deleting the object and potentially other objects in the backtrace. 13 Events should always be enqueued, rather than directy dispatched, for this reason. 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::mediaLoadingFailedFatally): 17 1 18 2021-05-12 Sergio Villar Senin <svillar@igalia.com> 2 19 -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r276978 r277379 2144 2144 2145 2145 // 5 - Fire an event named error at the media element. 2146 dispatchEvent(Event::create(eventNames().errorEvent, Event::CanBubble::No, Event::IsCancelable::No));2146 scheduleEvent(eventNames().errorEvent); 2147 2147 2148 2148 // 6 - Abort the overall resource selection algorithm.
Note:
See TracChangeset
for help on using the changeset viewer.