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

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

Issue 1571233003: Fix errors caused by unsafe conversions to/from size_t (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: improved ALLOW_NUMERIC_ARG_TYPES_PROMOTABLE_TO Created 4 years, 11 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
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, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 6 Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 void Resource::checkNotify() 245 void Resource::checkNotify()
246 { 246 {
247 if (isLoading()) 247 if (isLoading())
248 return; 248 return;
249 249
250 ResourceClientWalker<ResourceClient> w(m_clients); 250 ResourceClientWalker<ResourceClient> w(m_clients);
251 while (ResourceClient* c = w.next()) 251 while (ResourceClient* c = w.next())
252 c->notifyFinished(this); 252 c->notifyFinished(this);
253 } 253 }
254 254
255 void Resource::appendData(const char* data, unsigned length) 255 void Resource::appendData(const char* data, size_t length)
256 { 256 {
257 TRACE_EVENT0("blink", "Resource::appendData"); 257 TRACE_EVENT0("blink", "Resource::appendData");
258 ASSERT(m_revalidatingRequest.isNull()); 258 ASSERT(m_revalidatingRequest.isNull());
259 ASSERT(!errorOccurred()); 259 ASSERT(!errorOccurred());
260 if (m_options.dataBufferingPolicy == DoNotBufferData) 260 if (m_options.dataBufferingPolicy == DoNotBufferData)
261 return; 261 return;
262 if (m_data) 262 if (m_data)
263 m_data->append(data, length); 263 m_data->append(data, length);
264 else 264 else
265 m_data = SharedBuffer::createPurgeable(data, length); 265 m_data = SharedBuffer::createPurgeable(data, length);
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
1176 return "Media"; 1176 return "Media";
1177 case Resource::Manifest: 1177 case Resource::Manifest:
1178 return "Manifest"; 1178 return "Manifest";
1179 } 1179 }
1180 ASSERT_NOT_REACHED(); 1180 ASSERT_NOT_REACHED();
1181 return "Unknown"; 1181 return "Unknown";
1182 } 1182 }
1183 #endif // !LOG_DISABLED 1183 #endif // !LOG_DISABLED
1184 1184
1185 } // namespace blink 1185 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/fetch/Resource.h ('k') | third_party/WebKit/Source/core/fetch/ScriptResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698