136 places do something like: NS_DispatchToMainThread(new Foo()); We're passing in the new runnable Foo() with a refcount of 0, which is not great. If the dispatch fails, we end up leaking the runnable. This is probably not common, and likely will only affect us when we're shutting down anyways. Because there are so many of these places and it is a very mechanical transformation, I advise writing a script. See bug 1036629 for the pattern that should be used instead. search query: http://mxr.mozilla.org/mozilla-central/search?string=NS_DispatchToMainThread%28new&find=&findi=&filter=&hitlimit=&tree=mozilla-central
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1036629
You need to log in before you can comment on or make changes to this bug.