author | Henri Sivonen <hsivonen@iki.fi> |
Fri, 05 Apr 2013 15:36:16 +0300 | |
changeset 127795 | 905671d954c58534ec4b2c3a28db568c563b79e2 |
parent 127794 | 624ff603f70cb17d0664eb7b23deabdf12949a2c |
child 127796 | 1740631994daf663573763f3843b2e33c9850945 |
push id | 24512 |
push user | ryanvm@gmail.com |
push date | Fri, 05 Apr 2013 20:13:49 +0000 |
treeherder | mozilla-central@139b6ba547fa [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | smaug |
bugs | 849597 |
milestone | 23.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/parser/htmlparser/src/nsParser.cpp +++ b/parser/htmlparser/src/nsParser.cpp @@ -1094,16 +1094,17 @@ nsParser::ContinueInterruptedParsing() } // If the stream has already finished, there's a good chance // that we might start closing things down when the parser // is reenabled. To make sure that we're not deleted across // the reenabling process, hold a reference to ourselves. nsresult result=NS_OK; nsCOMPtr<nsIParser> kungFuDeathGrip(this); + nsCOMPtr<nsIContentSink> sinkDeathGrip(mSink); #ifdef DEBUG if (!(mFlags & NS_PARSER_FLAG_PARSER_ENABLED)) { NS_WARNING("Don't call ContinueInterruptedParsing on a blocked parser."); } #endif bool isFinalChunk = mParserContext && @@ -1904,16 +1905,18 @@ nsParser::OnDataAvailable(nsIRequest *re if (NS_FAILED(rv)) { return rv; } // Don't bother to start parsing until we've seen some // non-whitespace data if (IsOkToProcessNetworkData() && theContext->mScanner->FirstNonWhitespacePosition() >= 0) { + nsCOMPtr<nsIParser> kungFuDeathGrip(this); + nsCOMPtr<nsIContentSink> sinkDeathGrip(mSink); mProcessingNetworkData = true; if (mSink) { mSink->WillParse(); } rv = ResumeParse(); mProcessingNetworkData = false; } } else {