Chromium Code Reviews| Index: third_party/WebKit/Source/core/fetch/Resource.cpp |
| diff --git a/third_party/WebKit/Source/core/fetch/Resource.cpp b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| index d0de8259a3b53162531e2bb2d529296f5f0cf925..f684f39cc921044fa52872e731db0c99c9d34c1b 100644 |
| --- a/third_party/WebKit/Source/core/fetch/Resource.cpp |
| +++ b/third_party/WebKit/Source/core/fetch/Resource.cpp |
| @@ -317,6 +317,7 @@ Resource::Resource(const ResourceRequest& request, |
| m_isAlive(false), |
| m_integrityDisposition(ResourceIntegrityDisposition::NotChecked), |
| m_isAddRemoveClientProhibited(false), |
| + m_isNotifyClientsOfCompletionProhibited(false), |
|
Nate Chapin
2016/10/10 23:47:49
I'm suspicious this can be on ImageResource instea
sclittle
2016/10/11 02:56:56
Only the completion callbacks are being suppressed
Nate Chapin
2016/10/12 22:56:17
I'm not certain how much of a risk this is in prac
sclittle
2016/10/12 23:38:16
Good point, sorry, I forgot about ImageResource::d
|
| m_options(options), |
| m_responseTimestamp(currentTime()), |
| m_cancelTimer(this, &Resource::cancelTimerFired), |
| @@ -356,7 +357,7 @@ void Resource::checkNotify() { |
| } |
| void Resource::notifyClientsInternal(MarkFinishedOption markFinishedOption) { |
| - if (isLoading()) |
| + if (isLoading() || m_isNotifyClientsOfCompletionProhibited) |
| return; |
| ResourceClientWalker<ResourceClient> w(m_clients); |
| @@ -656,7 +657,7 @@ String Resource::reasonNotDeletable() const { |
| } |
| void Resource::didAddClient(ResourceClient* c) { |
| - if (isLoaded()) { |
| + if (isLoaded() && !m_isNotifyClientsOfCompletionProhibited) { |
| c->notifyFinished(this); |
| if (m_clients.contains(c)) { |
| m_finishedClients.add(c); |