nvda
0b21e78d - Address misleading garbage handler warnings and fix another reference cycle (#11552)

Commit
5 years ago
Address misleading garbage handler warnings and fix another reference cycle (#11552) * GarbageHandler: ensure that objects due to logging (WavePlayer for example) don't get logged as an object being cleaned up by the garbage collector. Specifically: * change the first log.error to a log.warning (so the error sound does not play). Note that this message still must be logged as it is the one that contains the stack trace showing where the garbage collection is running. * Increase the report count before logging any message in notifyOfObjectDeletion so that any objects deleted in the log calls themselves don't get tracked as the first object to be deleted. * Clear the garbage collection threadID in the gc hook before logging the final error, otherwise that error (and the error sound) is tracked as an object deletion. * MozillaCompoundTextInfo: only cache lastCaretObj if the compoundTextInfo is on the current focus, otherwise the caretObj may not be cleaned up and a reference cycle may remain.
Parents
Loading