We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 20d673b commit fd169e2Copy full SHA for fd169e2
src/phantom.cpp
@@ -522,7 +522,15 @@ void Phantom::doExit(int code)
522
emit aboutToExit(code);
523
m_terminated = true;
524
m_returnValue = code;
525
- foreach(QPointer<WebPage> page, m_pages) {
+
526
+ // Iterate in reverse order so the first page is the last one scheduled for deletion.
527
+ // The first page is the root object, which will be invalidated when it is deleted.
528
+ // This causes an assertion to go off in BridgeJSC.cpp Instance::createRuntimeObject.
529
+ QListIterator<QPointer<WebPage> > i(m_pages);
530
+ i.toBack();
531
+ while (i.hasPrevious()) {
532
+ const QPointer<WebPage> page = i.previous();
533
534
if (!page) {
535
continue;
536
}
0 commit comments