Bug 224038

Summary: Fix some missing exception checks in HTMLMediaElement methods.
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: MediaAssignee: Mark Lam <mark.lam>
Status: RESOLVED FIXED    
Severity: Normal CC: calvaris, cdumez, changseok, eric.carlson, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, hi, jer.noble, mkwst, philipj, sergio, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
proposed patch. eric.carlson: review+

Mark Lam
Reported 2021-03-31 20:30:29 PDT
Attachments
proposed patch. (9.83 KB, patch)
2021-03-31 20:34 PDT, Mark Lam
eric.carlson: review+
Mark Lam
Comment 1 2021-03-31 20:34:41 PDT
Created attachment 424870 [details] proposed patch.
Eric Carlson
Comment 2 2021-04-01 07:37:37 PDT
Comment on attachment 424870 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=424870&action=review > Source/WebCore/html/HTMLMediaElement.cpp:7277 > + auto clearExceptionAndReturnFalse = [&] () -> bool { > + scope.clearException(); > + return false; > + }; I think we might as well report the exception unless you know of a reason not to. Failing setup here will change the page behavior, so logging something may help us diagnose user problems.
Mark Lam
Comment 3 2021-04-01 08:36:41 PDT
Thanks for the review. (In reply to Eric Carlson from comment #2) > Comment on attachment 424870 [details] > proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=424870&action=review > > > Source/WebCore/html/HTMLMediaElement.cpp:7277 > > + auto clearExceptionAndReturnFalse = [&] () -> bool { > > + scope.clearException(); > > + return false; > > + }; > > I think we might as well report the exception unless you know of a reason > not to. Failing setup here will change the page behavior, so logging > something may help us diagnose user problems. I've applied this change. Landed in r275361: <http://trac.webkit.org/r275361>.
Note You need to log in before you can comment on or make changes to this bug.