diff options
author | Lars Knoll <lars.knoll@qt.io> | 2016-12-05 14:22:04 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2016-12-09 14:02:15 +0000 |
commit | ef90db10a8c943d4684a98035465e92327513130 (patch) | |
tree | 595c3570c47fedeebdd65bb3b21f7ccab26168e4 | |
parent | 91ac4a8d099d10fdfd5aa631da02727b7917d85f (diff) |
Fix the init() function in Heap::FunctionObject
One of the overloads took a QV4::Function * and was so far
apparently unused (as it couldn't have worked since change
3b14e2ffdd8eb4b7f7f4508768b75f2acc399370). Fix it since
it's getting some use again in the next change.
Change-Id: I3eabb332f9e3f2262a5710d43016346b7138f7e7
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 5bbe2d5f9a..93f707392c 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -81,7 +81,8 @@ void Heap::FunctionObject::init(QV4::ExecutionContext *scope, QV4::String *name, void Heap::FunctionObject::init(QV4::ExecutionContext *scope, Function *function, bool createProto) { Object::init(); - function = nullptr; + this->function = function; + function->compilationUnit->addref(); this->scope = scope->d(); Scope s(scope->engine()); ScopedString name(s, function->name()); |