D18126: [scripting] Avoid threading issues when loading from a file
David Edmundson <[email protected]>
| Newsgroups | gmane.comp.kde.devel.kwin |
|---|---|
| Message-ID | <[email protected]> |
davidedmundson created this revision. davidedmundson added a reviewer: KWin. Herald added a project: KWin. Herald added a subscriber: kwin. davidedmundson requested review of this revision. REVISION SUMMARY KWin::Script::loadScriptFromFile ran in it's own thread and accessed member variables of KWin::Script without any guards. Potentially script could be destroyed whilst the file is loading. Rather than adding mutexes everywhere, this patch scopes the QFile object to be local to the threaded function making it independent. BUG: 403038 TEST PLAN Ran a script from a file REPOSITORY R108 KWin BRANCH master REVISION DETAIL https://phabricator.kde.org/D18126 AFFECTED FILES scripting/scripting.cpp scripting/scripting.h To: davidedmundson, #kwin Cc: kwin, kvanton, jraleigh, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, ngraham, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart