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

Side by Side Diff: Source/core/html/imports/HTMLImportLoader.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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 { 84 {
85 // Resource may already have been loaded with the import loader 85 // Resource may already have been loaded with the import loader
86 // being added as a client later & now being notified. Fail early. 86 // being added as a client later & now being notified. Fail early.
87 if (resource->loadFailedOrCanceled() || response.httpStatusCode() >= 400) { 87 if (resource->loadFailedOrCanceled() || response.httpStatusCode() >= 400) {
88 setState(StateError); 88 setState(StateError);
89 return; 89 return;
90 } 90 }
91 setState(startWritingAndParsing(response)); 91 setState(startWritingAndParsing(response));
92 } 92 }
93 93
94 void HTMLImportLoader::dataReceived(Resource*, const char* data, int length) 94 void HTMLImportLoader::dataReceived(Resource*, const char* data, unsigned length )
95 { 95 {
96 RefPtrWillBeRawPtr<DocumentWriter> protectingWriter(m_writer.get()); 96 RefPtrWillBeRawPtr<DocumentWriter> protectingWriter(m_writer.get());
97 m_writer->addData(data, length); 97 m_writer->addData(data, length);
98 } 98 }
99 99
100 void HTMLImportLoader::notifyFinished(Resource* resource) 100 void HTMLImportLoader::notifyFinished(Resource* resource)
101 { 101 {
102 // The writer instance indicates that a part of the document can be already loaded. 102 // The writer instance indicates that a part of the document can be already loaded.
103 // We don't take such a case as an error because the partially-loaded docume nt has been visible from script at this point. 103 // We don't take such a case as an error because the partially-loaded docume nt has been visible from script at this point.
104 if (resource->loadFailedOrCanceled() && !m_writer) { 104 if (resource->loadFailedOrCanceled() && !m_writer) {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 visitor->trace(m_controller); 229 visitor->trace(m_controller);
230 #if ENABLE(OILPAN) 230 #if ENABLE(OILPAN)
231 visitor->trace(m_imports); 231 visitor->trace(m_imports);
232 #endif 232 #endif
233 visitor->trace(m_document); 233 visitor->trace(m_document);
234 visitor->trace(m_writer); 234 visitor->trace(m_writer);
235 visitor->trace(m_microtaskQueue); 235 visitor->trace(m_microtaskQueue);
236 } 236 }
237 237
238 } // namespace blink 238 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/html/imports/HTMLImportLoader.h ('k') | Source/core/inspector/InspectorResourceAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698