Bug 1350049: Handle nsParser being finalized before resuming. r=hsivonen
This is a hybrid of the previous two approaches. The nsParser weak reference sometimes stays alive after it's been detached from the document, after which attempting to remove it throws. This stores a reference to the original parser, and checks that it's still the current parser when it comes time to resume. MozReview-Commit-ID: 1JSi2FmPxt0
This commit is contained in:
@@ -682,7 +682,10 @@ nsParser::UnblockParser()
|
||||
NS_IMETHODIMP_(void)
|
||||
nsParser::ContinueInterruptedParsingAsync()
|
||||
{
|
||||
mSink->ContinueInterruptedParsingAsync();
|
||||
MOZ_ASSERT(mSink);
|
||||
if (MOZ_LIKELY(mSink)) {
|
||||
mSink->ContinueInterruptedParsingAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user