From: Lars Knoll Date: Fri, 21 Jun 2013 22:16:40 +0000 (+0200) Subject: Remove context argument from String::makeIdentifier() X-Git-Tag: upstream/5.2.1~669^2~159 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4171e1ed54b78e20ba3b7f5886c7f9dd87a93df2;p=platform%2Fupstream%2Fqtdeclarative.git Remove context argument from String::makeIdentifier() Change-Id: I7c02301499cb1a6895e94beb40ec35c2094bb999 Reviewed-by: Simon Hausmann --- diff --git a/src/qml/qml/qqmlxmlhttprequest.cpp b/src/qml/qml/qqmlxmlhttprequest.cpp index 8b6471f..aec4949 100644 --- a/src/qml/qml/qqmlxmlhttprequest.cpp +++ b/src/qml/qml/qqmlxmlhttprequest.cpp @@ -868,7 +868,7 @@ Value NamedNodeMap::get(Managed *m, String *name, bool *hasProperty) if (!r) v4->current->throwTypeError(); - name->makeIdentifier(v4->current); + name->makeIdentifier(); if (name->isEqualTo(v4->id_length)) return Value::fromInt32(r->list.count()); @@ -923,7 +923,7 @@ Value NodeList::get(Managed *m, String *name, bool *hasProperty) if (!r) v4->current->throwTypeError(); - name->makeIdentifier(v4->current); + name->makeIdentifier(); if (name->isEqualTo(v4->id_length)) return Value::fromInt32(r->d->children.count()); diff --git a/src/qml/qml/v4/qv4context.cpp b/src/qml/qml/v4/qv4context.cpp index 7ab493c..354595f 100644 --- a/src/qml/qml/v4/qv4context.cpp +++ b/src/qml/qml/v4/qv4context.cpp @@ -350,7 +350,7 @@ void ExecutionContext::setProperty(String *name, const Value& value) Value ExecutionContext::getProperty(String *name) { - name->makeIdentifier(this); + name->makeIdentifier(); if (name->isEqualTo(engine->id_this)) return thisObject; @@ -412,7 +412,7 @@ Value ExecutionContext::getProperty(String *name) Value ExecutionContext::getPropertyNoThrow(String *name) { - name->makeIdentifier(this); + name->makeIdentifier(); if (name->isEqualTo(engine->id_this)) return thisObject; @@ -474,7 +474,7 @@ Value ExecutionContext::getPropertyNoThrow(String *name) Value ExecutionContext::getPropertyAndBase(String *name, Object **base) { *base = 0; - name->makeIdentifier(this); + name->makeIdentifier(); if (name->isEqualTo(engine->id_this)) return thisObject; diff --git a/src/qml/qml/v4/qv4object.cpp b/src/qml/qml/v4/qv4object.cpp index f542f34..639cb4f 100644 --- a/src/qml/qml/v4/qv4object.cpp +++ b/src/qml/qml/v4/qv4object.cpp @@ -588,7 +588,7 @@ Value Object::internalGet(String *name, bool *hasProperty) if (idx != UINT_MAX) return getIndexed(idx, hasProperty); - name->makeIdentifier(engine()->current); + name->makeIdentifier(); Object *o = this; while (o) { @@ -651,7 +651,7 @@ void Object::internalPut(String *name, const Value &value) if (idx != UINT_MAX) return putIndexed(idx, value); - name->makeIdentifier(engine()->current); + name->makeIdentifier(); uint member = internalClass->find(name); Property *pd = 0; @@ -802,7 +802,7 @@ bool Object::internalDeleteProperty(String *name) if (idx != UINT_MAX) return deleteIndexedProperty(idx); - name->makeIdentifier(engine()->current); + name->makeIdentifier(); uint memberIdx = internalClass->find(name); if (memberIdx != UINT_MAX) { @@ -851,7 +851,7 @@ bool Object::__defineOwnProperty__(ExecutionContext *ctx, String *name, const Pr if (idx != UINT_MAX) return __defineOwnProperty__(ctx, idx, p, attrs); - name->makeIdentifier(ctx); + name->makeIdentifier(); Property *current; PropertyAttributes *cattrs; diff --git a/src/qml/qml/v4/qv4string.cpp b/src/qml/qml/v4/qv4string.cpp index c9e6657..8807326 100644 --- a/src/qml/qml/v4/qv4string.cpp +++ b/src/qml/qml/v4/qv4string.cpp @@ -208,9 +208,9 @@ uint String::toUInt(bool *ok) const return UINT_MAX; } -void String::makeIdentifierImpl(const ExecutionContext *ctx) +void String::makeIdentifierImpl() { - ctx->engine->identifierCache->toIdentifier(this); + engine()->identifierCache->toIdentifier(this); } void String::createHashValue() const diff --git a/src/qml/qml/v4/qv4string_p.h b/src/qml/qml/v4/qv4string_p.h index 2a855a2..437b5fb 100644 --- a/src/qml/qml/v4/qv4string_p.h +++ b/src/qml/qml/v4/qv4string_p.h @@ -99,13 +99,13 @@ struct Q_QML_EXPORT String : public Managed { } uint toUInt(bool *ok) const; - void makeIdentifier(const ExecutionContext *ctx) { + void makeIdentifier() { if (identifier != UINT_MAX) return; - makeIdentifierImpl(ctx); + makeIdentifierImpl(); } - void makeIdentifierImpl(const ExecutionContext *ctx); + void makeIdentifierImpl(); void createHashValue() const; static uint createHashValue(const QChar *ch, int length); diff --git a/src/qml/qml/v8/qjsvalue.cpp b/src/qml/qml/v8/qjsvalue.cpp index e45a221..036cdc8 100644 --- a/src/qml/qml/v8/qjsvalue.cpp +++ b/src/qml/qml/v8/qjsvalue.cpp @@ -800,7 +800,7 @@ QJSValue QJSValue::property(const QString& name) const if (idx < UINT_MAX) return property(idx); - s->makeIdentifier(engine->current); + s->makeIdentifier(); QV4::ExecutionContext *ctx = engine->current; try { QV4::Value v = o->get(s); @@ -871,7 +871,7 @@ void QJSValue::setProperty(const QString& name, const QJSValue& value) } QV4::ExecutionContext *ctx = engine->current; - s->makeIdentifier(ctx); + s->makeIdentifier(); try { o->put(s, value.d->getValue(engine)); } catch (QV4::Exception &e) {