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

Side by Side Diff: Source/core/fetch/ResourceLoader.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/Resource.cpp ('k') | Source/core/fetch/ScriptResource.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) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2010, 2011 Apple Inc. All rights reserved.
3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com) 3 * (C) 2007 Graham Dennis (graham.dennis@gmail.com)
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 // Reference the object in this method since the additional processing can d o 427 // Reference the object in this method since the additional processing can d o
428 // anything including removing the last reference to this object. 428 // anything including removing the last reference to this object.
429 RefPtrWillBeRawPtr<ResourceLoader> protect(this); 429 RefPtrWillBeRawPtr<ResourceLoader> protect(this);
430 430
431 // FIXME: If we get a resource with more than 2B bytes, this code won't do t he right thing. 431 // FIXME: If we get a resource with more than 2B bytes, this code won't do t he right thing.
432 // However, with today's computers and networking speeds, this won't happen in practice. 432 // However, with today's computers and networking speeds, this won't happen in practice.
433 // Could be an issue with a giant local file. 433 // Could be an issue with a giant local file.
434 m_host->didReceiveData(m_resource, data, length, encodedDataLength); 434 m_host->didReceiveData(m_resource, data, length, encodedDataLength);
435 if (m_state == Terminated) 435 if (m_state == Terminated)
436 return; 436 return;
437 RELEASE_ASSERT(length >= 0);
437 m_resource->appendData(data, length); 438 m_resource->appendData(data, length);
438 } 439 }
439 440
440 void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime, i nt64 encodedDataLength) 441 void ResourceLoader::didFinishLoading(blink::WebURLLoader*, double finishTime, i nt64 encodedDataLength)
441 { 442 {
442 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse || m_con nectionState == ConnectionStateReceivingData); 443 RELEASE_ASSERT(m_connectionState == ConnectionStateReceivedResponse || m_con nectionState == ConnectionStateReceivingData);
443 m_connectionState = ConnectionStateFinishedLoading; 444 m_connectionState = ConnectionStateFinishedLoading;
444 if (m_state != Initialized) 445 if (m_state != Initialized)
445 return; 446 return;
446 ASSERT(m_state != Terminated); 447 ASSERT(m_state != Terminated);
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength); 529 didFinishLoading(0, monotonicallyIncreasingTime(), encodedDataLength);
529 } 530 }
530 531
531 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const 532 ResourceRequest& ResourceLoader::applyOptions(ResourceRequest& request) const
532 { 533 {
533 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials); 534 request.setAllowStoredCredentials(m_options.allowCredentials == AllowStoredC redentials);
534 return request; 535 return request;
535 } 536 }
536 537
537 } 538 }
OLDNEW
« no previous file with comments | « Source/core/fetch/Resource.cpp ('k') | Source/core/fetch/ScriptResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698