Bug 1602944 - Move setting context to null. r=alchen

Differential Revision: https://phabricator.services.mozilla.com/D57965

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Henri Sivonen 2020-01-03 14:28:37 +00:00
parent ce17265e96
commit 401466e015
2 changed files with 4 additions and 4 deletions

View File

@ -719,8 +719,6 @@ public abstract class TreeBuilder<T> implements TokenHandler,
tokenizer.setState(Tokenizer.DATA);
}
}
contextName = null;
contextNode = null;
} else {
mode = INITIAL;
// If we are viewing XML source, put a foreign element permanently
@ -1631,6 +1629,8 @@ public abstract class TreeBuilder<T> implements TokenHandler,
public final void endTokenization() throws SAXException {
formPointer = null;
headPointer = null;
contextName = null;
contextNode = null;
templateModeStack = null;
if (stack != null) {
while (currentPtr > -1) {

View File

@ -209,8 +209,6 @@ void nsHtml5TreeBuilder::startTokenization(nsHtml5Tokenizer* self) {
tokenizer->setState(nsHtml5Tokenizer::DATA);
}
}
contextName = nullptr;
contextNode = nullptr;
} else {
mode = INITIAL;
if (tokenizer->isViewingXmlSource()) {
@ -651,6 +649,8 @@ eofloop_end:;
void nsHtml5TreeBuilder::endTokenization() {
formPointer = nullptr;
headPointer = nullptr;
contextName = nullptr;
contextNode = nullptr;
templateModeStack = nullptr;
if (stack) {
while (currentPtr > -1) {