diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-08-24 16:16:56 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-09-15 07:37:22 +0000 |
commit | 0e6195a85c5b9beceac719a7ea0c1389667bfcb3 (patch) | |
tree | abb6e1cfbb31142cd5aaa4b8e1a43cd61dc35548 /src/qml/jsruntime/qv4object.cpp | |
parent | df7710a2052a205267854f611e12e120b2dfdc26 (diff) |
Cleanup usage of ExecutionEngine::currentContext
Change-Id: Ic79d6da162375928ec25871cd0341daeab6483d2
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4object.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4object.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/qml/jsruntime/qv4object.cpp b/src/qml/jsruntime/qv4object.cpp index b3c0863e3e..9bdb047e6e 100644 --- a/src/qml/jsruntime/qv4object.cpp +++ b/src/qml/jsruntime/qv4object.cpp @@ -120,7 +120,7 @@ void Object::putValue(Property *pd, PropertyAttributes attrs, const Value &value return; reject: - if (engine()->currentContext()->strictMode) + if (engine()->current->strictMode) engine()->throwTypeError(); } @@ -466,7 +466,7 @@ void Object::setLookup(Managed *m, Lookup *l, const Value &value) { Scope scope(static_cast<Object *>(m)->engine()); ScopedObject o(scope, static_cast<Object *>(m)); - ScopedString name(scope, scope.engine->currentContext()->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, scope.engine->current->compilationUnit->runtimeStrings[l->nameIndex]); InternalClass *c = o->internalClass(); uint idx = c->find(name); @@ -725,7 +725,7 @@ void Object::internalPut(String *name, const Value &value) return; reject: - if (engine()->currentContext()->strictMode) { + if (engine()->current->strictMode) { QString message = QStringLiteral("Cannot assign to read-only property \""); message += name->toQString(); message += QLatin1Char('\"'); @@ -798,7 +798,7 @@ void Object::internalPutIndexed(uint index, const Value &value) return; reject: - if (engine()->currentContext()->strictMode) + if (engine()->current->strictMode) engine()->throwTypeError(); } @@ -820,7 +820,7 @@ bool Object::internalDeleteProperty(String *name) InternalClass::removeMember(this, name->identifier()); return true; } - if (engine()->currentContext()->strictMode) + if (engine()->current->strictMode) engine()->throwTypeError(); return false; } @@ -838,7 +838,7 @@ bool Object::internalDeleteIndexedProperty(uint index) if (!ad || ad->vtable()->del(this, index)) return true; - if (engine()->currentContext()->strictMode) + if (engine()->current->strictMode) engine()->throwTypeError(); return false; } @@ -902,7 +902,7 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, String *name, const return __defineOwnProperty__(engine, memberIndex, name, p, attrs); reject: - if (engine->currentContext()->strictMode) + if (engine->current->strictMode) engine->throwTypeError(); return false; } @@ -918,7 +918,7 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, uint index, const Pr return defineOwnProperty2(engine, index, p, attrs); reject: - if (engine->currentContext()->strictMode) + if (engine->current->strictMode) engine->throwTypeError(); return false; } @@ -954,7 +954,7 @@ bool Object::defineOwnProperty2(ExecutionEngine *engine, uint index, const Prope return __defineOwnProperty__(engine, index, 0, p, attrs); reject: - if (engine->currentContext()->strictMode) + if (engine->current->strictMode) engine->throwTypeError(); return false; } @@ -1045,7 +1045,7 @@ bool Object::__defineOwnProperty__(ExecutionEngine *engine, uint index, String * } return true; reject: - if (engine->currentContext()->strictMode) + if (engine->current->strictMode) engine->throwTypeError(); return false; } @@ -1157,7 +1157,7 @@ Heap::ArrayObject::ArrayObject(ExecutionEngine *engine, const QStringList &list) ReturnedValue ArrayObject::getLookup(const Managed *m, Lookup *l) { Scope scope(static_cast<const Object *>(m)->engine()); - ScopedString name(scope, scope.engine->currentContext()->compilationUnit->runtimeStrings[l->nameIndex]); + ScopedString name(scope, scope.engine->current->compilationUnit->runtimeStrings[l->nameIndex]); if (name->equals(scope.engine->id_length())) { // special case, as the property is on the object itself l->getter = Lookup::arrayLengthGetter; |