Corrected XPath iterator for ancestor-or-self axes for runaway behaviour
authorDavid Eisner <david.eisner@oriel.oxon.org>
Thu, 21 Jul 2011 22:19:00 +0000 (23:19 +0100)
committerDavid Eisner <david.eisner@oriel.oxon.org>
Thu, 21 Jul 2011 22:19:00 +0000 (23:19 +0100)
commit342df43e69669fcd9b8203abffdfe14e0882bb58
treebb892f08674c5889d7b54546c8fae2391fdfbd35
parentdaae18420ac9a2ffd9123b9727abe693cfdb9bce
Corrected XPath iterator for ancestor-or-self axes for runaway behaviour

Adding a test case for ancestor-or-self along the lines of the existing one for ancestor showed runaway, memory-eating behaviour. In changing CollectResults to remove the livelock, it seemed simplest to remove the extra yield of the root from MoveNextCore. I was unable to ascertain a good reason for producing this element in this special way compared to the AncestorIterator.
mcs/class/System.XML/System.Xml.XPath/Iterator.cs