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

Side by Side Diff: Source/core/loader/WorkerLoaderClientBridgeSyncHelper.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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 OwnPtr<ResourceResponse> response(ResourceResponse::adopt(responseData)); 72 OwnPtr<ResourceResponse> response(ResourceResponse::adopt(responseData));
73 client->didReceiveResponse(identifier, *response); 73 client->didReceiveResponse(identifier, *response);
74 } 74 }
75 75
76 void WorkerLoaderClientBridgeSyncHelper::didReceiveResponse(unsigned long identi fier, const ResourceResponse& response) 76 void WorkerLoaderClientBridgeSyncHelper::didReceiveResponse(unsigned long identi fier, const ResourceResponse& response)
77 { 77 {
78 ASSERT(isMainThread()); 78 ASSERT(isMainThread());
79 m_clientTasks.append(bind(&didReceiveResponseAdapter, &m_client, identifier, response.copyData())); 79 m_clientTasks.append(bind(&didReceiveResponseAdapter, &m_client, identifier, response.copyData()));
80 } 80 }
81 81
82 void WorkerLoaderClientBridgeSyncHelper::didReceiveData(const char* data, int da taLength) 82 void WorkerLoaderClientBridgeSyncHelper::didReceiveData(const char* data, unsign ed dataLength)
83 { 83 {
84 ASSERT(isMainThread()); 84 ASSERT(isMainThread());
85 Vector<char>* buffer = new Vector<char>(dataLength); 85 Vector<char>* buffer = new Vector<char>(dataLength);
86 memcpy(buffer->data(), data, dataLength); 86 memcpy(buffer->data(), data, dataLength);
87 m_receivedData.append(buffer); 87 m_receivedData.append(buffer);
88 m_clientTasks.append(bind(&ThreadableLoaderClient::didReceiveData, &m_client , static_cast<const char*>(buffer->data()), dataLength)); 88 m_clientTasks.append(bind(&ThreadableLoaderClient::didReceiveData, &m_client , static_cast<const char*>(buffer->data()), dataLength));
89 } 89 }
90 90
91 void WorkerLoaderClientBridgeSyncHelper::didDownloadData(int dataLength) 91 void WorkerLoaderClientBridgeSyncHelper::didDownloadData(int dataLength)
92 { 92 {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 WorkerLoaderClientBridgeSyncHelper::WorkerLoaderClientBridgeSyncHelper(Threadabl eLoaderClient& client, PassOwnPtr<blink::WebWaitableEvent> event) 138 WorkerLoaderClientBridgeSyncHelper::WorkerLoaderClientBridgeSyncHelper(Threadabl eLoaderClient& client, PassOwnPtr<blink::WebWaitableEvent> event)
139 : m_done(false) 139 : m_done(false)
140 , m_client(client) 140 , m_client(client)
141 , m_event(event) 141 , m_event(event)
142 { 142 {
143 ASSERT(m_event); 143 ASSERT(m_event);
144 } 144 }
145 145
146 } // namespace blink 146 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/loader/WorkerLoaderClientBridgeSyncHelper.h ('k') | Source/core/loader/WorkerThreadableLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698