aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-06 13:41:29 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:06 +0000
commitb58711804e9cca641927dbdebe281488e475352b (patch)
treecb7671cb6edc52e5e744a370704ec068c7ab45eb /src/qml/jsruntime/qv4context.cpp
parent238b1cb1cb8915995b6dfe4e404f1771c62b3169 (diff)
Use Identifier by value and don't new them anymore
Change-Id: Ib25c08027013217657beb2675dafa9a8c85cbaf9 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index bd2e0faebf..c81af767fa 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -175,7 +175,7 @@ void ExecutionContext::createMutableBinding(String *name, bool deletable)
bool ExecutionContext::deleteProperty(String *name)
{
name->makeIdentifier();
- Identifier *id = name->identifier();
+ Identifier id = name->identifier();
Heap::ExecutionContext *ctx = d();
for (; ctx; ctx = ctx->outer) {
@@ -211,7 +211,7 @@ bool ExecutionContext::deleteProperty(String *name)
ExecutionContext::Error ExecutionContext::setProperty(String *name, const Value &value)
{
name->makeIdentifier();
- Identifier *id = name->identifier();
+ Identifier id = name->identifier();
QV4::ExecutionEngine *v4 = engine();
Heap::ExecutionContext *ctx = d();
@@ -274,7 +274,7 @@ ReturnedValue ExecutionContext::getProperty(String *name)
case Heap::ExecutionContext::Type_BlockContext:
case Heap::ExecutionContext::Type_CallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);
- Identifier *id = name->identifier();
+ Identifier id = name->identifier();
uint index = c->internalClass->find(id);
if (index < UINT_MAX)
@@ -311,7 +311,7 @@ ReturnedValue ExecutionContext::getPropertyAndBase(String *name, Value *base)
case Heap::ExecutionContext::Type_CallContext: {
Heap::CallContext *c = static_cast<Heap::CallContext *>(ctx);
name->makeIdentifier();
- Identifier *id = name->identifier();
+ Identifier id = name->identifier();
uint index = c->internalClass->find(id);
if (index < UINT_MAX)