Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: third_party/WebKit/Source/core/fetch/ImageResource.cpp

Issue 2304523003: Fix CHECK condition in ImageResource (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de) 2 Copyright (C) 1998 Lars Knoll (knoll@mpi-hd.mpg.de)
3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org) 3 Copyright (C) 2001 Dirk Mueller (mueller@kde.org)
4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org) 4 Copyright (C) 2002 Waldo Bastian (bastian@kde.org)
5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 5 Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
7 7
8 This library is free software; you can redistribute it and/or 8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Library General Public 9 modify it under the terms of the GNU Library General Public
10 License as published by the Free Software Foundation; either 10 License as published by the Free Software Foundation; either
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 211
212 void ImageResource::doResetAnimation() 212 void ImageResource::doResetAnimation()
213 { 213 {
214 if (m_image) 214 if (m_image)
215 m_image->resetAnimation(); 215 m_image->resetAnimation();
216 } 216 }
217 217
218 void ImageResource::allClientsAndObserversRemoved() 218 void ImageResource::allClientsAndObserversRemoved()
219 { 219 {
220 if (m_image) { 220 if (m_image) {
221 CHECK(!errorOccurred()); 221 CHECK(m_image->isNull() || !errorOccurred());
222 // If possible, delay the resetting until back at the event loop. 222 // If possible, delay the resetting until back at the event loop.
223 // Doing so after a conservative GC prevents resetAnimation() from 223 // Doing so after a conservative GC prevents resetAnimation() from
224 // upsetting ongoing animation updates (crbug.com/613709) 224 // upsetting ongoing animation updates (crbug.com/613709)
225 if (!ThreadHeap::willObjectBeLazilySwept(this)) 225 if (!ThreadHeap::willObjectBeLazilySwept(this))
226 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B LINK_FROM_HERE, WTF::bind(&ImageResource::doResetAnimation, wrapWeakPersistent(t his))); 226 Platform::current()->currentThread()->getWebTaskRunner()->postTask(B LINK_FROM_HERE, WTF::bind(&ImageResource::doResetAnimation, wrapWeakPersistent(t his)));
227 else 227 else
228 m_image->resetAnimation(); 228 m_image->resetAnimation();
229 } 229 }
230 if (m_multipartParser) 230 if (m_multipartParser)
231 m_multipartParser->cancel(); 231 m_multipartParser->cancel();
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 if (response().wasFetchedViaServiceWorker()) 592 if (response().wasFetchedViaServiceWorker())
593 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque; 593 return response().serviceWorkerResponseType() != WebServiceWorkerRespons eTypeOpaque;
594 if (!getImage()->currentFrameHasSingleSecurityOrigin()) 594 if (!getImage()->currentFrameHasSingleSecurityOrigin())
595 return false; 595 return false;
596 if (passesAccessControlCheck(securityOrigin)) 596 if (passesAccessControlCheck(securityOrigin))
597 return true; 597 return true;
598 return !securityOrigin->taintsCanvas(response().url()); 598 return !securityOrigin->taintsCanvas(response().url());
599 } 599 }
600 600
601 } // namespace blink 601 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698