On Sat, Jul 12, 2014 at 10:47:48PM +0100, NetSurf Browser Project wrote: > > - Log ----------------------------------------------------------------- > commitdiff > http://git.netsurf-browser.org/libhubbub.git/commit/?id=1b8977f12ae4b9a88b6bea16540661c31a5bb326 > commit 1b8977f12ae4b9a88b6bea16540661c31a5bb326 > Author: Rupinder Singh Khokhar <rsk1code...@gmail.com> > Commit: Rupinder Singh Khokhar <rsk1code...@gmail.com> > > Added provision for the treebuilder to change tokeniser's state. > Additionally, in every loop of the dispatcher, it will be checked whether it > is safe for tokeniser to process CDATA, and corresponding opts on the > tokeniser will be set. this may slow the library down because of repeated > checking in every loop.
I don't understand this changeset. Why have you exposed the tokeniser's internal state to the outside world? It is extremely dangerous to do this, as it makes it utterly unclear what triggers a state transition. Additionally, only the tokeniser needs to know what state it is in; the client of the tokeniser must treat it as a black box. J.