Changeset 287751 in webkit
- Timestamp:
- Jan 7, 2022, 9:19:18 AM (5 years ago)
- Location:
- branches/safari-612.4.9.3-branch
- Files:
-
- 4 added
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/http/conf/mime.types (modified) (1 diff)
-
LayoutTests/http/tests/media/media-element-frame-destroyed-crash-expected.txt (added)
-
LayoutTests/http/tests/media/media-element-frame-destroyed-crash.html (added)
-
LayoutTests/http/tests/media/resources/empty.ts (added)
-
LayoutTests/http/tests/media/resources/media-element-frame-destroyed-crash-subframe.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/html/HTMLMediaElement.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.4.9.3-branch/LayoutTests/ChangeLog
r287680 r287751 1 2022-01-07 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r287604. rdar://problem/85966622 4 5 Protect frame from destruction in HTMLMediaElement::setupAndCallJS 6 https://bugs.webkit.org/show_bug.cgi?id=234259 7 8 Patch by Frédéric Wang <fwang@igalia.com> on 2022-01-04 9 Reviewed by Darin Adler. 10 11 Source/WebCore: 12 13 Test: http/tests/media/media-element-frame-destroyed-crash.html 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::setupAndCallJS): Protect the frame before executing the JS code, 17 so that it is not destroyed before its associated ScriptController. 18 19 LayoutTests: 20 21 Add non-regression test, embedded in multiple iframes to make regression easily reproducible. 22 23 * http/conf/mime.types: Ensure that ts files are served with MIME type video/mp2t as that's required 24 to make the non-regression test work properly. 25 * http/tests/media/media-element-frame-destroyed-crash-expected.txt: Added. 26 * http/tests/media/media-element-frame-destroyed-crash.html: Added. 27 * http/tests/media/resources/empty.ts: Added. 28 * http/tests/media/resources/media-element-frame-destroyed-crash-subframe.html: Added. 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287604 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2022-01-04 Frédéric Wang <fwang@igalia.com> 33 34 Protect frame from destruction in HTMLMediaElement::setupAndCallJS 35 https://bugs.webkit.org/show_bug.cgi?id=234259 36 37 Reviewed by Darin Adler. 38 39 Add non-regression test, embedded in multiple iframes to make regression easily reproducible. 40 41 * http/conf/mime.types: Ensure that ts files are served with MIME type video/mp2t as that's required 42 to make the non-regression test work properly. 43 * http/tests/media/media-element-frame-destroyed-crash-expected.txt: Added. 44 * http/tests/media/media-element-frame-destroyed-crash.html: Added. 45 * http/tests/media/resources/empty.ts: Added. 46 * http/tests/media/resources/media-element-frame-destroyed-crash-subframe.html: Added. 47 1 48 2022-01-06 Russell Epstein <repstein@apple.com> 2 49 -
branches/safari-612.4.9.3-branch/LayoutTests/http/conf/mime.types
r271939 r287751 579 579 video/mp1s 580 580 video/mp2p 581 video/mp2t 581 video/mp2t ts 582 582 video/mp4 mp4 583 583 video/mp4v-es -
branches/safari-612.4.9.3-branch/Source/WebCore/ChangeLog
r287680 r287751 1 2022-01-07 Russell Epstein <repstein@apple.com> 2 3 Cherry-pick r287604. rdar://problem/85966622 4 5 Protect frame from destruction in HTMLMediaElement::setupAndCallJS 6 https://bugs.webkit.org/show_bug.cgi?id=234259 7 8 Patch by Frédéric Wang <fwang@igalia.com> on 2022-01-04 9 Reviewed by Darin Adler. 10 11 Source/WebCore: 12 13 Test: http/tests/media/media-element-frame-destroyed-crash.html 14 15 * html/HTMLMediaElement.cpp: 16 (WebCore::HTMLMediaElement::setupAndCallJS): Protect the frame before executing the JS code, 17 so that it is not destroyed before its associated ScriptController. 18 19 LayoutTests: 20 21 Add non-regression test, embedded in multiple iframes to make regression easily reproducible. 22 23 * http/conf/mime.types: Ensure that ts files are served with MIME type video/mp2t as that's required 24 to make the non-regression test work properly. 25 * http/tests/media/media-element-frame-destroyed-crash-expected.txt: Added. 26 * http/tests/media/media-element-frame-destroyed-crash.html: Added. 27 * http/tests/media/resources/empty.ts: Added. 28 * http/tests/media/resources/media-element-frame-destroyed-crash-subframe.html: Added. 29 30 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287604 268f45cc-cd09-0410-ab3c-d52691b4dbfc 31 32 2022-01-04 Frédéric Wang <fwang@igalia.com> 33 34 Protect frame from destruction in HTMLMediaElement::setupAndCallJS 35 https://bugs.webkit.org/show_bug.cgi?id=234259 36 37 Reviewed by Darin Adler. 38 39 Test: http/tests/media/media-element-frame-destroyed-crash.html 40 41 * html/HTMLMediaElement.cpp: 42 (WebCore::HTMLMediaElement::setupAndCallJS): Protect the frame before executing the JS code, 43 so that it is not destroyed before its associated ScriptController. 44 1 45 2022-01-06 Russell Epstein <repstein@apple.com> 2 46 -
branches/safari-612.4.9.3-branch/Source/WebCore/html/HTMLMediaElement.cpp
r285446 r287751 4398 4398 auto pendingActivity = makePendingActivity(*this); 4399 4399 auto& world = ensureIsolatedWorld(); 4400 auto& scriptController = document().frame()->script(); 4400 Ref protectedFrame = *document().frame(); 4401 auto& scriptController = protectedFrame->script(); 4401 4402 auto* globalObject = JSC::jsCast<JSDOMGlobalObject*>(scriptController.globalObject(world)); 4402 4403 auto& vm = globalObject->vm();
Note:
See TracChangeset
for help on using the changeset viewer.