Commit fd685138 authored by Aurindam Jana's avatar Aurindam Jana Committed by Kai Koehne

QmlConsole: Fix infinite recursion bug

The queried v8 object sometimes returns a child item that
refers to itself triggering an infinite recursion.

Task-number: QTCREATORBUG-9747
Change-Id: I30dfbb834ebeb39c33a6050d4b4860b1b47f34d9
Reviewed-by: default avatarEike Ziller <>
Reviewed-by: default avatarMitch Curtis <>
Reviewed-by: default avatarKai Koehne <>
parent 415c4c77
......@@ -1771,8 +1771,10 @@ QmlJS::ConsoleItem *constructLogItemTree(QmlJS::ConsoleItem *parent,
ConsoleItem *item = new ConsoleItem(parent, ConsoleItem::UndefinedType, text);
foreach (const QVariant &property, {
ConsoleItem *child = constructLogItemTree(item, extractData(property, refsVal),
const QmlV8ObjectData childObjectData = extractData(property, refsVal);
if (childObjectData.handle == objectData.handle)
ConsoleItem *child = constructLogItemTree(item, childObjectData, refsVal);
if (child)
item->insertChild(child, sorted);
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