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

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

Issue 618583002: Correct data size argument type in resource loading path to unsigned (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add static_cast to RELEASE_ASSERT in AssociatedURLLoader::ClientAdapter::didReceiveData Created 6 years, 2 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 | « Source/core/fetch/ImageResource.h ('k') | Source/core/fetch/MemoryCacheTest.cpp » ('j') | 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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 338
339 inline void ImageResource::clearImage() 339 inline void ImageResource::clearImage()
340 { 340 {
341 // If our Image has an observer, it's always us so we need to clear the back pointer 341 // If our Image has an observer, it's always us so we need to clear the back pointer
342 // before dropping our reference. 342 // before dropping our reference.
343 if (m_image) 343 if (m_image)
344 m_image->setImageObserver(0); 344 m_image->setImageObserver(0);
345 m_image.clear(); 345 m_image.clear();
346 } 346 }
347 347
348 void ImageResource::appendData(const char* data, int length) 348 void ImageResource::appendData(const char* data, unsigned length)
349 { 349 {
350 Resource::appendData(data, length); 350 Resource::appendData(data, length);
351 if (!m_loadingMultipartContent) 351 if (!m_loadingMultipartContent)
352 updateImage(false); 352 updateImage(false);
353 } 353 }
354 354
355 void ImageResource::updateImage(bool allDataReceived) 355 void ImageResource::updateImage(bool allDataReceived)
356 { 356 {
357 TRACE_EVENT0("blink", "ImageResource::updateImage"); 357 TRACE_EVENT0("blink", "ImageResource::updateImage");
358 358
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin) 489 bool ImageResource::isAccessAllowed(SecurityOrigin* securityOrigin)
490 { 490 {
491 if (!image()->currentFrameHasSingleSecurityOrigin()) 491 if (!image()->currentFrameHasSingleSecurityOrigin())
492 return false; 492 return false;
493 if (passesAccessControlCheck(securityOrigin)) 493 if (passesAccessControlCheck(securityOrigin))
494 return true; 494 return true;
495 return !securityOrigin->taintsCanvas(response().url()); 495 return !securityOrigin->taintsCanvas(response().url());
496 } 496 }
497 497
498 } // namespace blink 498 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/fetch/ImageResource.h ('k') | Source/core/fetch/MemoryCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698