Bug 234184

Summary: ContextDestructionObserver::m_scriptExecutionContext should be private
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebCore Misc.Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, benjamin, calvaris, changseok, darin, eric.carlson, esprehn+autocc, ews-watchlist, ggaren, glenn, gyuyoung.kim, hi, hta, jer.noble, kangil.han, mkwst, philipj, sam, sergio, tommyw, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description Chris Dumez 2021-12-10 15:56:05 PST
ContextDestructionObserver::m_scriptExecutionContext should be private. It is poor encapsulation to have protected data members.
Comment 1 Chris Dumez 2021-12-10 15:58:02 PST
Created attachment 446836 [details]
Patch
Comment 2 youenn fablet 2021-12-11 09:16:03 PST
Comment on attachment 446836 [details]
Patch

Some pre-existing places are using *scriptExecutionContext() and it is not clear whether it is guaranteed to not be null.

View in context: https://bugs.webkit.org/attachment.cgi?id=446836&action=review

> Source/WebCore/Modules/encryptedmedia/MediaKeySystemRequest.cpp:65
> +    auto context = scriptExecutionContext();

auto*
Comment 3 Chris Dumez 2021-12-11 15:26:04 PST
Created attachment 446908 [details]
Patch
Comment 4 EWS 2021-12-11 16:30:17 PST
Committed r286918 (245144@main): <https://commits.webkit.org/245144@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446908 [details].
Comment 5 Radar WebKit Bug Importer 2021-12-11 16:31:18 PST
<rdar://problem/86370839>