Skip to content
  • David Edmundson's avatar
    [scripting] Avoid threading issues when loading from a file · ba7aecfe
    David Edmundson authored
    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
    
    Reviewers: #kwin, graesslin
    
    Reviewed By: #kwin, graesslin
    
    Subscribers: kwin
    
    Tags: #kwin
    
    Differential Revision: https://phabricator.kde.org/D18126
    ba7aecfe