Fix invalid reads with strings
authorSimon Hausmann <simon.hausmann@digia.com>
Sat, 17 Aug 2013 12:54:56 +0000 (14:54 +0200)
committerLars Knoll <lars.knoll@digia.com>
Sun, 18 Aug 2013 10:30:11 +0000 (12:30 +0200)
commitca2b4d1ccabc3bccde4d146284b1cac39058e711
treea1212508a9ba63935801254a278ade73ff0ac819
parent45dacdaa788eeac64148465658b6af2d2fa552cf
Fix invalid reads with strings

It may happen that a dynamically created compilation unit disappears before any
QV4::Strings it created. Those strings would still have a reference to the
QString data in the compilation unit. I don't see a choice other than making a
copy of the string data ;(. But this patch adds a flag that would allow for
avoiding it if we happen to know that the compilation unit data is static.

Change-Id: Ib35a4d2a566b301a25ffe56e392809e44e7b4ae8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/compiler/qv4compileddata.cpp
src/qml/compiler/qv4compileddata_p.h
src/qml/jsruntime/qv4function.cpp