aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-03-31 20:23:27 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-04-20 04:09:59 +0000
commitca4dbd5675ad3aabffb9fb92f19b53b4c5028981 (patch)
tree80a1c877186f611174d2ee640a23f431fe48cded /src/qml/jsruntime
parentaa1524a4dde5098da2c9e40eb60bbaecf69bbe1c (diff)
Address uninitialized pointer variables
Coverity CID 10721, 84861, 86705, 85424, 85422, 85259, 84863, 84857 Change-Id: Ia86970b5ac4e0be9de01b79b618d33011da6a328 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime')
-rw-r--r--src/qml/jsruntime/qv4errorobject.cpp1
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp7
2 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4errorobject.cpp b/src/qml/jsruntime/qv4errorobject.cpp
index 119ad93e63..9034dee6a0 100644
--- a/src/qml/jsruntime/qv4errorobject.cpp
+++ b/src/qml/jsruntime/qv4errorobject.cpp
@@ -60,6 +60,7 @@ using namespace QV4;
Heap::ErrorObject::ErrorObject(InternalClass *ic, QV4::Object *prototype)
: Heap::Object(ic, prototype)
+ , stack(Q_NULLPTR)
{
Scope scope(ic->engine);
Scoped<QV4::ErrorObject> e(scope, this);
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index 7006a8892d..0a12d013ac 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -65,6 +65,7 @@ DEFINE_OBJECT_VTABLE(FunctionObject);
Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, QV4::String *name, bool createProto)
: Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject())
, scope(scope->d())
+ , function(Q_NULLPTR)
{
Scope s(scope->engine());
ScopedFunctionObject f(s, this);
@@ -74,6 +75,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, QV4::String *
Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, Function *function, bool createProto)
: Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject())
, scope(scope->d())
+ , function(Q_NULLPTR)
{
Scope s(scope->engine());
ScopedString name(s, function->name());
@@ -84,6 +86,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, Function *fun
Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const QString &name, bool createProto)
: Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject())
, scope(scope->d())
+ , function(Q_NULLPTR)
{
Scope s(scope->engine());
ScopedFunctionObject f(s, this);
@@ -94,6 +97,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const QString
Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const QString &name, bool createProto)
: Heap::Object(scope->engine->functionClass, scope->engine->functionPrototype.asObject())
, scope(scope)
+ , function(Q_NULLPTR)
{
Scope s(scope->engine);
ScopedFunctionObject f(s, this);
@@ -104,6 +108,7 @@ Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const QString &nam
Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const ReturnedValue name)
: Heap::Object(scope->d()->engine->functionClass, scope->d()->engine->functionPrototype.asObject())
, scope(scope->d())
+ , function(Q_NULLPTR)
{
Scope s(scope);
ScopedFunctionObject f(s, this);
@@ -114,6 +119,7 @@ Heap::FunctionObject::FunctionObject(QV4::ExecutionContext *scope, const Returne
Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValue name)
: Heap::Object(scope->engine->functionClass, scope->engine->functionPrototype.asObject())
, scope(scope)
+ , function(Q_NULLPTR)
{
Scope s(scope->engine);
ScopedFunctionObject f(s, this);
@@ -124,6 +130,7 @@ Heap::FunctionObject::FunctionObject(ExecutionContext *scope, const ReturnedValu
Heap::FunctionObject::FunctionObject(InternalClass *ic, QV4::Object *prototype)
: Heap::Object(ic, prototype)
, scope(ic->engine->rootContext())
+ , function(Q_NULLPTR)
{
Scope scope(ic->engine);
ScopedObject o(scope, this);