mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-11 08:13:35 +00:00
Bug 1343069 - Capture a strong reference to nsRootPresContext in EnsureEventualDidPaintEvent, r=mattwoodrow
MozReview-Commit-ID: GRi4afSovP4
This commit is contained in:
parent
dba2e68a7e
commit
a54cbcb40f
@ -3268,9 +3268,10 @@ nsRootPresContext::EnsureEventualDidPaintEvent(uint64_t aTransactionId)
|
||||
|
||||
nsCOMPtr<nsITimer> timer = do_CreateInstance("@mozilla.org/timer;1");
|
||||
if (timer) {
|
||||
nsresult rv = timer->InitWithCallback(NewTimerCallback([=](){
|
||||
RefPtr<nsRootPresContext> self = this;
|
||||
nsresult rv = timer->InitWithCallback(NewTimerCallback([self, aTransactionId](){
|
||||
nsAutoScriptBlocker blockScripts;
|
||||
this->NotifyDidPaintForSubtree(aTransactionId);
|
||||
self->NotifyDidPaintForSubtree(aTransactionId);
|
||||
}), 100, nsITimer::TYPE_ONE_SHOT);
|
||||
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
|
Loading…
Reference in New Issue
Block a user