aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4context.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-19 09:58:50 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-22 01:06:20 +0200
commit383fa29f95a595be4d6f4da113dff3b0dca79343 (patch)
treec0158b37c56df5daa9be9d7222cce229d8afaa96 /src/qml/jsruntime/qv4context.cpp
parent332b870bd8f0fba6f09e539376a674d7a4413631 (diff)
Convert the remaining vtable methods to be GC safe
Change-Id: I679d1833609c41d71e8436ec0ba8a4624f0c4dd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4context.cpp')
-rw-r--r--src/qml/jsruntime/qv4context.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4context.cpp b/src/qml/jsruntime/qv4context.cpp
index 73a059c4e8..baa4ade837 100644
--- a/src/qml/jsruntime/qv4context.cpp
+++ b/src/qml/jsruntime/qv4context.cpp
@@ -286,16 +286,15 @@ void CallContext::initQmlContext(ExecutionContext *parentContext, Object *qml, F
}
-bool ExecutionContext::deleteProperty(String *name)
+bool ExecutionContext::deleteProperty(const StringRef name)
{
Scope scope(this);
- ScopedString n(scope, name);
bool hasWith = false;
for (ExecutionContext *ctx = this; ctx; ctx = ctx->outer) {
if (ctx->type == Type_WithContext) {
hasWith = true;
WithContext *w = static_cast<WithContext *>(ctx);
- if (w->withObject->__hasProperty__(n))
+ if (w->withObject->__hasProperty__(name))
return w->withObject->deleteProperty(name);
} else if (ctx->type == Type_CatchContext) {
CatchContext *c = static_cast<CatchContext *>(ctx);
@@ -312,11 +311,11 @@ bool ExecutionContext::deleteProperty(String *name)
if (f->formalParameterList[i]->isEqualTo(name))
return false;
}
- if (c->activation && c->activation->__hasProperty__(n))
+ if (c->activation && c->activation->__hasProperty__(name))
return c->activation->deleteProperty(name);
} else if (ctx->type == Type_GlobalContext) {
GlobalContext *g = static_cast<GlobalContext *>(ctx);
- if (g->global->__hasProperty__(n))
+ if (g->global->__hasProperty__(name))
return g->global->deleteProperty(name);
}
}