-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Vector<uint8_t> instead of Vector<char> to store bytes in SharedB…
…uffer https://bugs.webkit.org/show_bug.cgi?id=226623 Reviewed by Darin Adler. Use Vector<uint8_t> instead of Vector<char> to store bytes in SharedBuffer. Also have SharedBuffer::data() return a `const uint8_t*` instead of `const char*`. This is our preferred type to store bytes. Source/WebCore: * Modules/fetch/FetchBody.cpp: (WebCore::FetchBody::consumeFormData): * Modules/fetch/FetchBodyConsumer.cpp: (WebCore::packageFormData): (WebCore::resolveWithTypeAndData): * Modules/highlight/AppHighlight.h: (WebCore::AppHighlight::encode const): * Modules/indexeddb/IDBGetResult.cpp: (WebCore::IDBGetResult::dataFromBuffer): * Modules/indexeddb/server/IDBSerialization.cpp: (WebCore::serializeIDBKeyData): * Modules/mediastream/RTCDataChannel.cpp: (WebCore::RTCDataChannel::didReceiveRawData): * Modules/mediastream/RTCDataChannel.h: * Modules/mediastream/RTCDataChannelRemoteHandler.cpp: (WebCore::RTCDataChannelRemoteHandler::didReceiveRawData): (WebCore::RTCDataChannelRemoteHandler::sendRawData): * Modules/mediastream/RTCDataChannelRemoteHandler.h: * Modules/mediastream/RTCDataChannelRemoteSource.h: (WebCore::RTCDataChannelRemoteSource::sendRawData): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.cpp: (WebCore::LibWebRTCDataChannelHandler::sendRawData): (WebCore::LibWebRTCDataChannelHandler::OnMessage): * Modules/mediastream/libwebrtc/LibWebRTCDataChannelHandler.h: * css/CSSFontFaceSource.cpp: (WebCore::CSSFontFaceSource::load): * fileapi/Blob.cpp: (WebCore::Blob::Blob): * fileapi/NetworkSendQueue.cpp: (WebCore::NetworkSendQueue::enqueue): (WebCore::NetworkSendQueue::processMessages): * fileapi/NetworkSendQueue.h: * inspector/NetworkResourcesData.cpp: (WebCore::NetworkResourcesData::ResourceData::appendData): (WebCore::NetworkResourcesData::maybeAddResourceData): * inspector/NetworkResourcesData.h: * inspector/agents/InspectorNetworkAgent.cpp: (WebCore::InspectorNetworkAgent::didReceiveData): * inspector/agents/InspectorPageAgent.cpp: (WebCore::decodeBuffer): (WebCore::InspectorPageAgent::dataContent): * inspector/agents/InspectorPageAgent.h: * loader/ContentFilter.cpp: (WebCore::ContentFilter::deliverResourceData): * loader/DocumentLoader.cpp: (WebCore::DocumentLoader::continueAfterContentPolicy): (WebCore::DocumentLoader::maybeCreateArchive): (WebCore::DocumentLoader::maybeFinishLoadingMultipartContent): * loader/DocumentThreadableLoader.cpp: (WebCore::DocumentThreadableLoader::didFinishLoading): (WebCore::DocumentThreadableLoader::loadRequest): * loader/FrameLoader.cpp: (WebCore::FrameLoader::loadResourceSynchronously): * loader/NetscapePlugInStreamLoader.cpp: (WebCore::NetscapePlugInStreamLoader::didReceiveDataOrBuffer): * loader/NetscapePlugInStreamLoader.h: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::didReceiveDataOrBuffer): * loader/SubresourceLoader.cpp: (WebCore::SubresourceLoader::didReceiveDataOrBuffer): * loader/TextResourceDecoder.h: (WebCore::TextResourceDecoder::decode): (WebCore::TextResourceDecoder::decodeAndFlush): * loader/TextTrackLoader.cpp: (WebCore::TextTrackLoader::processNewCueData): * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): * loader/appcache/ApplicationCacheStorage.cpp: (WebCore::ApplicationCacheStorage::writeDataToUniqueFileInDirectory): * loader/archive/mhtml/MHTMLArchive.cpp: (WebCore::MHTMLArchive::generateMHTMLData): * loader/archive/mhtml/MHTMLParser.cpp: (WebCore::MHTMLParser::parseNextPart): * loader/cache/CachedRawResource.cpp: (WebCore::CachedRawResource::updateBuffer): (WebCore::CachedRawResource::finishLoading): (WebCore::CachedRawResource::didAddClient): * loader/cache/CachedSVGFont.cpp: (WebCore::CachedSVGFont::ensureCustomFontData): * platform/SharedBuffer.cpp: (WebCore::SharedBuffer::SharedBuffer): (WebCore::SharedBuffer::create): (WebCore::SharedBuffer::combineIntoOneSegment const): (WebCore::SharedBuffer::data const): (WebCore::SharedBuffer::tryCreateArrayBuffer const): (WebCore::SharedBuffer::append): (WebCore::SharedBuffer::DataSegment::data const): (WebCore::SharedBuffer::DataSegment::size const): (WebCore::SharedBufferDataView::data const): (WebCore::utf8Buffer): * platform/SharedBuffer.h: * platform/encryptedmedia/clearkey/CDMClearKey.cpp: (WebCore::extractKeyidsLocationFromCencInitData): (WebCore::extractKeyidsFromCencInitData): * platform/graphics/Model.h: (WebCore::Model::encode const): * platform/graphics/displaylists/DisplayListItemBuffer.cpp: (WebCore::DisplayList::ItemBuffer::append): * platform/graphics/gstreamer/eme/CDMThunder.cpp: (WebCore::CDMInstanceThunder::setServerCertificate): (WebCore::ParsedResponseMessage::ParsedResponseMessage): (WebCore::CDMInstanceSessionThunder::errorCallback): (WebCore::CDMInstanceSessionThunder::requestLicense): (WebCore::CDMInstanceSessionThunder::updateLicense): (WebCore::CDMInstanceSessionThunder::loadSession): * platform/graphics/opentype/OpenTypeTypes.h: (WebCore::OpenType::TableBase::isValidEnd): * platform/mediastream/RTCDataChannelHandler.h: * platform/mediastream/RTCDataChannelHandlerClient.h: * platform/mediastream/RTCDataChannelRemoteSourceConnection.h: * platform/mock/RTCDataChannelHandlerMock.cpp: (WebCore::RTCDataChannelHandlerMock::sendRawData): * platform/mock/RTCDataChannelHandlerMock.h: * platform/network/FormData.cpp: (WebCore::FormData::asSharedBuffer const): * platform/network/ResourceHandleClient.cpp: (WebCore::ResourceHandleClient::didReceiveBuffer): * platform/network/cocoa/RangeResponseGenerator.mm: (WebCore::RangeResponseGenerator::giveResponseToTaskIfBytesInRangeReceived): * platform/text/TextEncoding.h: (WebCore::TextEncoding::decode const): * svg/graphics/SVGImage.cpp: (WebCore::SVGImage::dataChanged): * xml/XSLTProcessorLibxslt.cpp: (WebCore::docLoaderFunc): * xml/parser/XMLDocumentParserLibxml2.cpp: (WebCore::OffsetBuffer::OffsetBuffer): Source/WebKit: * Platform/IPC/SharedBufferCopy.h: (IPC::SharedBufferCopy::data const): * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::streamDidReceiveData): (WebKit::PluginControllerProxy::manualStreamDidReceiveData): * Shared/PersistencyUtils.cpp: (WebKit::writeToDisk): * Shared/WebCoreArgumentCoders.cpp: (IPC::tryConvertToShareableResourceHandle): * UIProcess/WebURLSchemeTask.cpp: (WebKit::WebURLSchemeTask::didComplete): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveData): * WebProcess/Network/WebSocketChannel.cpp: (WebKit::WebSocketChannel::createMessageQueue): * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp: (WebKit::RTCDataChannelRemoteManager::sendData): (WebKit::RTCDataChannelRemoteManager::receiveData): (WebKit::RTCDataChannelRemoteManager::RemoteSourceConnection::didReceiveRawData): * WebProcess/Network/webrtc/RTCDataChannelRemoteManager.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::parsePostBuffer): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::streamDidReceiveData): (WebKit::NetscapePlugin::manualStreamDidReceiveData): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::didReceiveData): (WebKit::NetscapePluginStream::sendJavaScriptStream): (WebKit::NetscapePluginStream::deliverData): (WebKit::NetscapePluginStream::deliverDataToFile): * WebProcess/Plugins/Netscape/NetscapePluginStream.h: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::PDFPluginStreamLoaderClient::didReceiveData): (WebKit::PDFPlugin::streamDidReceiveData): (WebKit::PDFPlugin::manualStreamDidReceiveData): * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::streamDidReceiveData): (WebKit::PluginProxy::manualStreamDidReceiveData): * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::didReceiveData): (WebKit::PluginView::manualLoadDidReceiveData): * WebProcess/Plugins/PluginView.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::committedLoad): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::bufferForType): Source/WebKitLegacy/mac: * Plugins/Hosted/HostedNetscapePluginStream.h: * Plugins/Hosted/HostedNetscapePluginStream.mm: (WebKit::HostedNetscapePluginStream::didReceiveData): * Plugins/Hosted/NetscapePluginInstanceProxy.mm: (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): * Plugins/Hosted/WebHostedNetscapePluginView.mm: (-[WebHostedNetscapePluginView pluginView:receivedData:]): * Plugins/WebNetscapePluginStream.h: * Plugins/WebNetscapePluginStream.mm: (WebNetscapePluginStream::didReceiveData): * Plugins/WebNetscapePluginView.mm: (-[WebNetscapePluginView pluginView:receivedData:]): (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]): Tools: * TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp: (TestWebKitAPI::TEST_F): (TestWebKitAPI::checkBuffer): Canonical link: https://commits.webkit.org/238515@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
214 changed files
with
667 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.