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

Side by Side Diff: Source/core/loader/DocumentLoader.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/DocumentLoader.h ('k') | Source/core/loader/DocumentThreadableLoader.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, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2011 Google Inc. All rights reserved.
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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr esh"), Document::HttpRefreshFromHeader); 530 m_frame->document()->maybeHandleHttpRefresh(m_response.httpHeaderField("Refr esh"), Document::HttpRefreshFromHeader);
531 } 531 }
532 532
533 void DocumentLoader::commitData(const char* bytes, size_t length) 533 void DocumentLoader::commitData(const char* bytes, size_t length)
534 { 534 {
535 ensureWriter(m_response.mimeType()); 535 ensureWriter(m_response.mimeType());
536 ASSERT(m_frame->document()->parsing()); 536 ASSERT(m_frame->document()->parsing());
537 m_writer->addData(bytes, length); 537 m_writer->addData(bytes, length);
538 } 538 }
539 539
540 void DocumentLoader::dataReceived(Resource* resource, const char* data, int leng th) 540 void DocumentLoader::dataReceived(Resource* resource, const char* data, unsigned length)
541 { 541 {
542 ASSERT(data); 542 ASSERT(data);
543 ASSERT(length); 543 ASSERT(length);
544 ASSERT_UNUSED(resource, resource == m_mainResource); 544 ASSERT_UNUSED(resource, resource == m_mainResource);
545 ASSERT(!m_response.isNull()); 545 ASSERT(!m_response.isNull());
546 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading()); 546 ASSERT(!mainResourceLoader() || !mainResourceLoader()->defersLoading());
547 547
548 // Both unloading the old page and parsing the new page may execute JavaScri pt which destroys the datasource 548 // Both unloading the old page and parsing the new page may execute JavaScri pt which destroys the datasource
549 // by starting a new load, so retain temporarily. 549 // by starting a new load, so retain temporarily.
550 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame); 550 RefPtrWillBeRawPtr<LocalFrame> protectFrame(m_frame);
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
831 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L() 831 // This is only called by FrameLoader::replaceDocumentWhileExecutingJavaScriptUR L()
832 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument) 832 void DocumentLoader::replaceDocumentWhileExecutingJavaScriptURL(const DocumentIn it& init, const String& source, Document* ownerDocument)
833 { 833 {
834 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true); 834 m_writer = createWriterFor(ownerDocument, init, mimeType(), m_writer ? m_wri ter->encoding() : emptyAtom, true);
835 if (!source.isNull()) 835 if (!source.isNull())
836 m_writer->appendReplacingData(source); 836 m_writer->appendReplacingData(source);
837 endWriting(m_writer.get()); 837 endWriting(m_writer.get());
838 } 838 }
839 839
840 } // namespace blink 840 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/DocumentLoader.h ('k') | Source/core/loader/DocumentThreadableLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698