diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-10-26 10:28:06 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2017-10-26 13:41:43 +0000 |
commit | 47e4f740cae4a9edc364c26fd1312c9070080558 (patch) | |
tree | 5d52835c5765f33ba8d1db1501d1b6c44a1adb82 | |
parent | 9bbd8bec0491c332572941ad5545e207e9d6e2b8 (diff) |
Fix releasing of script resources for Rule.outputArtifacts
The evaluate call just creates the function object for outputArtifacts
which is called later. We must release resources after the actual
function call.
Change-Id: I2013226bf57d2c892127824fc900a4802154b1c6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
-rw-r--r-- | src/lib/corelib/buildgraph/rulesapplicator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/corelib/buildgraph/rulesapplicator.cpp b/src/lib/corelib/buildgraph/rulesapplicator.cpp index 06c847e52..72a65c711 100644 --- a/src/lib/corelib/buildgraph/rulesapplicator.cpp +++ b/src/lib/corelib/buildgraph/rulesapplicator.cpp @@ -403,11 +403,11 @@ QList<Artifact *> RulesApplicator::runOutputArtifactsScript(const ArtifactSet &i QScriptValue fun = engine()->evaluate(m_rule->outputArtifactsScript->sourceCode, m_rule->outputArtifactsScript->location.filePath(), m_rule->outputArtifactsScript->location.line()); - engine()->releaseResourcesOfScriptObjects(); if (!fun.isFunction()) throw ErrorInfo(QLatin1String("Function expected."), m_rule->outputArtifactsScript->location); QScriptValue res = fun.call(QScriptValue(), args); + engine()->releaseResourcesOfScriptObjects(); if (engine()->hasErrorOrException(res)) throw engine()->lastError(res, m_rule->outputArtifactsScript->location); if (!res.isArray()) |