diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-02-06 09:33:54 +0100 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-02-06 09:16:46 +0000 |
commit | 3f87c4685e3d93522e8cad11a725dd193156d20d (patch) | |
tree | f4a51aefed465993ccff7d7f6382c2cb916aac25 /src/plugins/coreplugin/locator/javascriptfilter.h | |
parent | 6ca1d2bfa4c3880a90b28b96924e49b6f25acb9c (diff) |
Fix crash in timeout of JavaScript locator filterv4.6.0-beta1
The timeout code may not access thread local state, because if it fires
on the main thread after the thread already finished, that state is
gone.
Change-Id: I3b9b432515ff6f0c46c46b1904bdd622a19960d2
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/plugins/coreplugin/locator/javascriptfilter.h')
-rw-r--r-- | src/plugins/coreplugin/locator/javascriptfilter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/coreplugin/locator/javascriptfilter.h b/src/plugins/coreplugin/locator/javascriptfilter.h index 025ce2fa6a0..feaf326036b 100644 --- a/src/plugins/coreplugin/locator/javascriptfilter.h +++ b/src/plugins/coreplugin/locator/javascriptfilter.h @@ -27,6 +27,8 @@ #include <coreplugin/locator/ilocatorfilter.h> +#include <QTimer> + #include <memory> QT_BEGIN_NAMESPACE @@ -54,6 +56,8 @@ private: void setupEngine(); mutable std::unique_ptr<QScriptEngine> m_engine; + QTimer m_abortTimer; + bool m_aborted = false; }; } // namespace Internal |