bug 296121: The parser leaks when somebody calls document.open() and doesn't write any data. r+sr=bzbarsky a=shaver

git-svn-id: svn://10.0.0.236/trunk@173997 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
mrbkap%gmail.com
2005-06-01 22:37:04 +00:00
parent 73565feba2
commit 3561d0632c

View File

@@ -1,4 +1,5 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=2 et tw=78: */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@@ -1413,7 +1414,8 @@ NS_IMETHODIMP nsParser::Terminate(void)
else if (mSink) {
// We have no parser context or no DTD yet (so we got terminated before we
// got any data). Manually break the reference cycle with the sink.
mSink->SetParser(nsnull);
result = mSink->DidBuildModel();
NS_ENSURE_SUCCESS(result, result);
}
return NS_OK;
}