https://bugs.kde.org/show_bug.cgi?id=403038

David Edmundson <k...@davidedmundson.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |RESOLVED
      Latest Commit|                            |https://commits.kde.org/kwi
                   |                            |n/ba7aecfe53d765e0f94626ed0
                   |                            |0010a40284b99c0
         Resolution|---                         |FIXED

--- Comment #4 from David Edmundson <k...@davidedmundson.co.uk> ---
Git commit ba7aecfe53d765e0f94626ed00010a40284b99c0 by David Edmundson.
Committed on 09/01/2019 at 23:37.
Pushed by davidedmundson into branch 'master'.

[scripting] Avoid threading issues when loading from a file

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.

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

M  +8    -8    scripting/scripting.cpp
M  +3    -6    scripting/scripting.h

https://commits.kde.org/kwin/ba7aecfe53d765e0f94626ed00010a40284b99c0

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to