зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 4c53c4da7ece (bug 1677555) for causing multiple failures in imgRequestProxy.cpp CLOSED TREE
This commit is contained in:
Родитель
85cc2d756b
Коммит
9469a9b825
|
@ -188,10 +188,13 @@ class StyleImageRequestCleanupTask final : public mozilla::Runnable {
|
|||
// This is defined here for parallelism with LoadURI.
|
||||
void Gecko_LoadData_Drop(StyleLoadData* aData) {
|
||||
if (aData->resolved_image) {
|
||||
// We want to dispatch this async to prevent reentrancy issues, as
|
||||
// imgRequestProxy going away can destroy documents, etc, see bug 1677555.
|
||||
auto task = MakeRefPtr<StyleImageRequestCleanupTask>(*aData);
|
||||
SchedulerGroup::Dispatch(TaskCategory::Other, task.forget());
|
||||
if (NS_IsMainThread()) {
|
||||
task->Run();
|
||||
} else {
|
||||
// if Resolve was not called at some point, mDocGroup is not set.
|
||||
SchedulerGroup::Dispatch(TaskCategory::Other, task.forget());
|
||||
}
|
||||
}
|
||||
|
||||
// URIs are safe to refcount from any thread.
|
||||
|
|
Загрузка…
Ссылка в новой задаче