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

Side by Side Diff: Source/core/loader/DocumentThreadableLoader.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/loader/DocumentThreadableLoader.h ('k') | Source/core/loader/TextTrackLoader.h » ('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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013, Intel Corporation 3 * Copyright (C) 2013, Intel Corporation
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec urityOrigin(), accessControlErrorDescription)) { 389 if (!passesAccessControlCheck(response, effectiveAllowCredentials(), sec urityOrigin(), accessControlErrorDescription)) {
390 notifyResponseReceived(identifier, response); 390 notifyResponseReceived(identifier, response);
391 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn ternal, 0, response.url().string(), accessControlErrorDescription)); 391 m_client->didFailAccessControlCheck(ResourceError(errorDomainBlinkIn ternal, 0, response.url().string(), accessControlErrorDescription));
392 return; 392 return;
393 } 393 }
394 } 394 }
395 395
396 m_client->didReceiveResponse(identifier, response); 396 m_client->didReceiveResponse(identifier, response);
397 } 397 }
398 398
399 void DocumentThreadableLoader::dataReceived(Resource* resource, const char* data , int dataLength) 399 void DocumentThreadableLoader::dataReceived(Resource* resource, const char* data , unsigned dataLength)
400 { 400 {
401 ASSERT_UNUSED(resource, resource == this->resource()); 401 ASSERT_UNUSED(resource, resource == this->resource());
402 handleReceivedData(data, dataLength); 402 handleReceivedData(data, dataLength);
403 } 403 }
404 404
405 void DocumentThreadableLoader::handleReceivedData(const char* data, int dataLeng th) 405 void DocumentThreadableLoader::handleReceivedData(const char* data, unsigned dat aLength)
406 { 406 {
407 ASSERT(m_client); 407 ASSERT(m_client);
408 // Preflight data should be invisible to clients. 408 // Preflight data should be invisible to clients.
409 if (!m_actualRequest) 409 if (!m_actualRequest)
410 m_client->didReceiveData(data, dataLength); 410 m_client->didReceiveData(data, dataLength);
411 } 411 }
412 412
413 void DocumentThreadableLoader::notifyFinished(Resource* resource) 413 void DocumentThreadableLoader::notifyFinished(Resource* resource)
414 { 414 {
415 ASSERT(m_client); 415 ASSERT(m_client);
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
567 return DoNotAllowStoredCredentials; 567 return DoNotAllowStoredCredentials;
568 return m_resourceLoaderOptions.allowCredentials; 568 return m_resourceLoaderOptions.allowCredentials;
569 } 569 }
570 570
571 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const 571 SecurityOrigin* DocumentThreadableLoader::securityOrigin() const
572 { 572 {
573 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin (); 573 return m_securityOrigin ? m_securityOrigin.get() : m_document.securityOrigin ();
574 } 574 }
575 575
576 } // namespace blink 576 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentThreadableLoader.h ('k') | Source/core/loader/TextTrackLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698