Commit 34372ecd authored by Ulf Hermann's avatar Ulf Hermann
Browse files

QmlProfiler: Prevent V8 model from reading unrelated trace data



Change-Id: I2b079af208cfbe9969749847685da80fdff9be90
Reviewed-by: default avatarKai Koehne <kai.koehne@digia.com>
parent 3c094eee
......@@ -380,7 +380,8 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
if (attributes.hasAttribute(QLatin1String("totalTime")))
d->v8MeasuredTime = attributes.value(QLatin1String("totalTime")).toString().toDouble();
while (!stream.atEnd() && !stream.hasError()) {
bool finishedReading = false;
while (!stream.atEnd() && !stream.hasError() && !finishedReading) {
QXmlStreamReader::TokenType token = stream.readNext();
const QStringRef elementName = stream.name();
switch (token) {
......@@ -456,6 +457,7 @@ void QV8ProfilerDataModel::load(QXmlStreamReader &stream)
}
case QXmlStreamReader::EndElement : {
if (elementName == QLatin1String("v8profile")) {
finishedReading = true;
// done reading the v8 profile data
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment