зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1063369. When we clone an imgRequestProxy and it currently has an imgCacheValidator checking if the request is still valid over the network make sure to add the new proxy to the validator so that the validator can update the proxy to point to a new request if it finds the old request to be stale. r=seth
Since the CSS image loader (for example background images) always uses a cloned request for painting the image this results in stale images being shown. This patch is almost the same as the patch Boris Zbarsky posted to bug 432391 in 2011, but I didn't notice that patch until too late. There is one siginificant difference though. We call AddProxy and SetNotificationsDeferred before calling SyncNotifyListener in this patch. Calling them after leads to orange on try server.
This commit is contained in:
Родитель
30be5220e8
Коммит
7703b19fed
|
@ -695,6 +695,11 @@ imgRequestProxy::PerformClone(imgINotificationObserver* aObserver,
|
|||
return rv;
|
||||
}
|
||||
|
||||
if (GetOwner() && GetOwner()->GetValidator()) {
|
||||
clone->SetNotificationsDeferred(true);
|
||||
GetOwner()->GetValidator()->AddProxy(clone);
|
||||
}
|
||||
|
||||
// Assign to *aClone before calling Notify so that if the caller expects to
|
||||
// only be notified for requests it's already holding pointers to it won't be
|
||||
// surprised.
|
||||
|
|
Загрузка…
Ссылка в новой задаче