As a follow up of https://commits.webkit.org/r277379, add ScriptDisallowedScope to a bunch of member functions of MediaPlayerPrivateAVFoundation.
Created attachment 428594 [details] Adds ScriptDisallowedScope
Comment on attachment 428594 [details] Adds ScriptDisallowedScope View in context: https://bugs.webkit.org/attachment.cgi?id=428594&action=review > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3623 > + ScriptDisallowedScope scriptDisallowedScope; Can't this use the less expensive `ScriptDisallowedScope::InMainThread`? > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3722 > + ScriptDisallowedScope scriptDisallowedScope; Ditto. > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3755 > + ScriptDisallowedScope scriptDisallowedScope; Ditto > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3827 > + ScriptDisallowedScope scriptDisallowedScope; Ditto
(In reply to Eric Carlson from comment #2) > Comment on attachment 428594 [details] > Adds ScriptDisallowedScope > > View in context: > https://bugs.webkit.org/attachment.cgi?id=428594&action=review > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3623 > > + ScriptDisallowedScope scriptDisallowedScope; > > Can't this use the less expensive `ScriptDisallowedScope::InMainThread`? Is it guaranteed that all these code will always run in the main thread? > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3722 > > + ScriptDisallowedScope scriptDisallowedScope; > > Ditto. > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3755 > > + ScriptDisallowedScope scriptDisallowedScope; > > Ditto > > > Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3827 > > + ScriptDisallowedScope scriptDisallowedScope; > > Ditto
Comment on attachment 428594 [details] Adds ScriptDisallowedScope View in context: https://bugs.webkit.org/attachment.cgi?id=428594&action=review >>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3623 >>> + ScriptDisallowedScope scriptDisallowedScope; >> >> Can't this use the less expensive `ScriptDisallowedScope::InMainThread`? > > Is it guaranteed that all these code will always run in the main thread? Each of these tasks runs inside of an `ensureOnMainThread` block for the same reason you want to disallow script - because they may call up into HTMLMediaElement.
(In reply to Eric Carlson from comment #4) > Comment on attachment 428594 [details] > Adds ScriptDisallowedScope > > View in context: > https://bugs.webkit.org/attachment.cgi?id=428594&action=review > > >>> Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:3623 > >>> + ScriptDisallowedScope scriptDisallowedScope; > >> > >> Can't this use the less expensive `ScriptDisallowedScope::InMainThread`? > > > > Is it guaranteed that all these code will always run in the main thread? > > Each of these tasks runs inside of an `ensureOnMainThread` block for the > same reason you want to disallow script - because they may call up into > HTMLMediaElement. Oh, right. Will change to use ScriptDisallowedScope::InMainThread.
Created attachment 428663 [details] Patch for landing
Committed r277512 (237742@main): <https://commits.webkit.org/237742@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 428663 [details].
<rdar://problem/78035454>