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

Unified Diff: third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp

Issue 2605733002: [TEST] Forbid ImageResourceContent::updateImage() reentrancy
Patch Set: Created 4 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
index 60998017672bdc16522f24c37a891ae6385261d9..9cebb73b2d15ea786e1738421a032664e0168ca6 100644
--- a/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceContent.cpp
@@ -308,6 +308,9 @@ void ImageResourceContent::updateImage(PassRefPtr<SharedBuffer> data,
bool allDataReceived) {
TRACE_EVENT0("blink", "ImageResourceContent::updateImage");
+ DCHECK(!m_isUpdateImageBeingCalled);
+ AutoReset<bool> scope(&m_isUpdateImageBeingCalled, true);
+
if (clearImageOption == ImageResourceContent::ClearExistingImage) {
clearImage();
}
« no previous file with comments | « third_party/WebKit/Source/core/loader/resource/ImageResourceContent.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698