diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-12-22 10:56:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-03-15 13:04:50 +0000 |
commit | 5f24122c780b462d7091abc12c9861d1e9713dca (patch) | |
tree | ae2771e2a8804481bb9a8364b50607a98c4caf08 /src/qml/util | |
parent | 24ec7b6c8352600230c40b61be4bfce07076c9a5 (diff) |
Fix lookups the transition between primitive strings and string objects
Suppose we have
function foo(x) { return x.constructor; }
and we call it first with
foo("hello")
then the lookup will be initialized with a primitive getter from the
prototype.
When we subsequently call
foo(new String("world"))
then the primitiveGetterProto() will check that the provided object is
of the same type as last time, which erroneously succeeds. Indeed, both
are of Managed type. However now we're passing a full-fledged object,
which is not a primitive anymore - hence the additional check to ensure
that we fall back to the generic getter.
Task-number: QTBUG-69898
Change-Id: I3c7a8384bfdf0e31b7c6247cce80fe7448b627b3
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/util')
0 files changed, 0 insertions, 0 deletions