diff options
author | Lars Knoll <lars.knoll@digia.com> | 2014-03-10 15:18:54 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-10 21:00:22 +0100 |
commit | dfed088a50298fe4a9d0eb8a9d0a2711dfc206c1 (patch) | |
tree | 08b5ad6b162a2ca15e173aa190c961a89c5340b6 /src/qml/jsruntime/qv4functionobject.cpp | |
parent | f67335fc340eafba04437e4b75ce9ac3edbffc54 (diff) | |
download | qtdeclarative-dfed088a50298fe4a9d0eb8a9d0a2711dfc206c1.tar.gz |
Fix copying of Property's
Data properties don't contain valid data in the set field
if they are being stored in Objects. Thus we should never
access that field unless we are dealing with accessor
properties.
Change-Id: I19dcbaee7ebd042ae24387f92a93571d75ca578a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4functionobject.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4functionobject.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp index 9b502a0927..c53c528e39 100644 --- a/src/qml/jsruntime/qv4functionobject.cpp +++ b/src/qml/jsruntime/qv4functionobject.cpp @@ -374,7 +374,7 @@ ScriptFunction::ScriptFunction(ExecutionContext *scope, Function *function) defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(formalParameterCount())); if (scope->strictMode) { - Property pd = Property::fromAccessor(v4->thrower, v4->thrower); + Property pd(v4->thrower, v4->thrower); insertMember(scope->engine->id_caller, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); insertMember(scope->engine->id_arguments, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); } @@ -457,7 +457,7 @@ SimpleScriptFunction::SimpleScriptFunction(ExecutionContext *scope, Function *fu defineReadonlyProperty(scope->engine->id_length, Primitive::fromInt32(formalParameterCount())); if (scope->strictMode) { - Property pd = Property::fromAccessor(v4->thrower, v4->thrower); + Property pd(v4->thrower, v4->thrower); insertMember(scope->engine->id_caller, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); insertMember(scope->engine->id_arguments, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); } @@ -631,7 +631,7 @@ BoundFunction::BoundFunction(ExecutionContext *scope, FunctionObjectRef target, ExecutionEngine *v4 = scope->engine; - Property pd = Property::fromAccessor(v4->thrower, v4->thrower); + Property pd(v4->thrower, v4->thrower); insertMember(scope->engine->id_arguments, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); insertMember(scope->engine->id_caller, pd, Attr_Accessor|Attr_NotConfigurable|Attr_NotEnumerable); } |