diff options
Diffstat (limited to 'src/script/api')
-rw-r--r-- | src/script/api/qscriptengine.cpp | 3 | ||||
-rw-r--r-- | src/script/api/qscriptengine_p.h | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp index d82108496e..cebbe0e583 100644 --- a/src/script/api/qscriptengine.cpp +++ b/src/script/api/qscriptengine.cpp @@ -962,7 +962,7 @@ QScriptEnginePrivate::QScriptEnginePrivate() qobjectPrototype(0), qmetaobjectPrototype(0), variantPrototype(0), activeAgent(0), agentLineNumber(-1), registeredScriptValues(0), freeScriptValues(0), freeScriptValuesCount(0), - registeredScriptStrings(0), processEventsInterval(-1), inEval(false) + registeredScriptStrings(0), processEventsInterval(-1), inEval(false), inDestructor(false) { qMetaTypeId<QScriptValue>(); qMetaTypeId<QList<int> >(); @@ -1015,6 +1015,7 @@ QScriptEnginePrivate::QScriptEnginePrivate() QScriptEnginePrivate::~QScriptEnginePrivate() { + inDestructor = true; QScript::APIShim shim(this); //disconnect all loadedScripts and generate all jsc::debugger::scriptUnload events diff --git a/src/script/api/qscriptengine_p.h b/src/script/api/qscriptengine_p.h index 6a023d7b94..8a7037b002 100644 --- a/src/script/api/qscriptengine_p.h +++ b/src/script/api/qscriptengine_p.h @@ -382,6 +382,7 @@ public: int processEventsInterval; QScriptValue abortResult; bool inEval; + bool inDestructor; JSC::UString cachedTranslationUrl; JSC::UString cachedTranslationContext; |