From 9b6c20cb719542cfcf3e031afd5b2b0b1cd3833e Mon Sep 17 00:00:00 2001 From: Ulf Hermann Date: Thu, 18 Apr 2019 15:37:17 +0200 Subject: Make JavaScript execution interruptible Add an atomic isInterrupted flag to BaseEngine and check that in addition to the hasException flag on checkException(). Add some more exception checks to cover all possible infinite loops. Also, remove the writeBarrierActive member from QV4::EngineBase. It isn't used. Fixes: QTBUG-49080 Change-Id: I86b3114e3e61aff3e5eb9b020749a908ed801c2b Reviewed-by: Simon Hausmann --- src/qml/jsapi/qjsengine.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qml/jsapi/qjsengine.h') diff --git a/src/qml/jsapi/qjsengine.h b/src/qml/jsapi/qjsengine.h index 6300842341..31a4d68baa 100644 --- a/src/qml/jsapi/qjsengine.h +++ b/src/qml/jsapi/qjsengine.h @@ -113,6 +113,9 @@ public: void installExtensions(Extensions extensions, const QJSValue &object = QJSValue()); + void setInterrupted(bool interrupted); + bool isInterrupted() const; + QV4::ExecutionEngine *handle() const { return m_v4Engine; } void throwError(const QString &message); -- cgit v1.2.3