Bug 1121669 - Add a mutex around mFlushTimer to deal with write appearing to other threads in an inconsistent order. r=jseward.

MozReview-Commit-ID: 56r9PsEf8Jv
This commit is contained in:
Henri Sivonen
2017-01-26 08:45:31 +02:00
parent 82d34d4bd6
commit 003efa0a20
2 changed files with 26 additions and 8 deletions

View File

@@ -544,6 +544,12 @@ class nsHtml5StreamParser : public nsICharsetDetectionObserver {
*/
nsCOMPtr<nsITimer> mFlushTimer;
/**
* Mutex for protecting access to mFlushTimer (but not for the two
* mFlushTimerFoo booleans below).
*/
mozilla::Mutex mFlushTimerMutex;
/**
* Keeps track whether mFlushTimer has been armed. Unfortunately,
* nsITimer doesn't enable querying this from the timer itself.