Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.15.2
-
64777c3ed9dc66e3510ce2139538b93ad68e9fbb (qt/qtdeclarative/dev) c8810492c204546ad12c0635fd72b649fe563097 (qt/qtdeclarative/6.2)
Description
Consider the following code snippet:
QString code(QStringLiteral(R"QBS( var test = ['val2']; test.unshift('val1'); test = test.concat([]); throw(JSON.stringify(test)); )QBS")); QJSEngine e; QJSValue v = e.evaluate(code); qDebug() << v.toString();
The output is:
"[\"val1\",null]"
I was not able to reduce it further. The array can be initialized like above or filled with push. But it must contain something before doing unshift followed by an empty concat.
Attachments
Issue Links
- is required for
-
QBS-913 QtScript dependency needs to be removed
-
- Closed
-
For Gerrit Dashboard: QTBUG-90456 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
361439,4 | JS: Ensure that array keeps valid after length changes and fix concat | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
362056,2 | JS: Ensure that array keeps valid after length changes and fix concat | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |