Changeset 245021 in webkit
- Timestamp:
- May 7, 2019 11:52:22 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 1 added
- 1 deleted
- 4 edited
- 5 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r245016 r245021 1 2019-05-07 Chris Dumez <cdumez@apple.com> 2 3 Rename ConnectionMac.mm to ConnectionCocoa.mm since it is used on both macOS and iOS 4 https://bugs.webkit.org/show_bug.cgi?id=197661 5 6 Reviewed by Alexey Proskuryakov. 7 8 * Platform/IPC/cocoa/ConnectionCocoa.mm: Renamed from Source/WebKit/Platform/IPC/mac/ConnectionMac.mm. 9 (IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): 10 (IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): 11 (IPC::ConnectionTerminationWatchdog::watchdogTimerFired): 12 (IPC::Connection::platformInvalidate): 13 (IPC::Connection::cancelReceiveSource): 14 (IPC::Connection::terminateSoon): 15 (IPC::Connection::platformInitialize): 16 (IPC::Connection::open): 17 (IPC::Connection::sendMessage): 18 (IPC::Connection::platformCanSendOutgoingMessages const): 19 (IPC::Connection::sendOutgoingMessage): 20 (IPC::Connection::initializeSendSource): 21 (IPC::Connection::resumeSendSource): 22 (IPC::createMessageDecoder): 23 (IPC::readFromMachPort): 24 (IPC::Connection::receiveSourceEventHandler): 25 (IPC::Connection::identifier const): 26 (IPC::Connection::getAuditToken): 27 (IPC::Connection::kill): 28 (IPC::AccessibilityProcessSuspendedNotification): 29 (IPC::Connection::willSendSyncMessage): 30 (IPC::Connection::didReceiveSyncReply): 31 (IPC::Connection::remoteProcessID const): 32 * Platform/IPC/cocoa/ImportanceAssertion.h: Renamed from Source/WebKit/Platform/IPC/mac/ImportanceAssertion.h. 33 (IPC::ImportanceAssertion::ImportanceAssertion): 34 (IPC::ImportanceAssertion::~ImportanceAssertion): 35 * Platform/IPC/cocoa/MachMessage.cpp: Renamed from Source/WebKit/Platform/IPC/mac/MachMessage.cpp. 36 (IPC::MachMessage::create): 37 (IPC::MachMessage::MachMessage): 38 (IPC::MachMessage::~MachMessage): 39 (IPC::MachMessage::messageSize): 40 (IPC::MachMessage::leakDescriptors): 41 * Platform/IPC/cocoa/MachMessage.h: Renamed from Source/WebKit/Platform/IPC/mac/MachMessage.h. 42 (IPC::MachMessage::size const): 43 (IPC::MachMessage::header): 44 (IPC::MachMessage::messageReceiverName const): 45 (IPC::MachMessage::messageName const): 46 * Platform/IPC/cocoa/MachPort.h: Renamed from Source/WebKit/Platform/IPC/mac/MachPort.h. 47 (IPC::MachPort::MachPort): 48 (IPC::MachPort::encode const): 49 (IPC::MachPort::decode): 50 (IPC::MachPort::port const): 51 (IPC::MachPort::disposition const): 52 * PlatformMac.cmake: 53 * SourcesCocoa.txt: 54 * WebKit.xcodeproj/project.pbxproj: 55 1 56 2019-05-07 Antti Koivisto <antti@apple.com> 2 57 -
trunk/Source/WebKit/Platform/IPC/cocoa/ConnectionCocoa.mm
r245020 r245021 232 232 setMachPortQueueLength(m_receivePort, MACH_PORT_QLIMIT_LARGE); 233 233 234 RefPtr<Connection> connection(this);235 234 m_receiveSource = dispatch_source_create(DISPATCH_SOURCE_TYPE_MACH_RECV, m_receivePort, 0, m_connectionQueue->dispatchQueue()); 236 dispatch_source_set_event_handler(m_receiveSource, [ connection] {237 connection->receiveSourceEventHandler();235 dispatch_source_set_event_handler(m_receiveSource, [this, protectedThis = makeRefPtr(this)] { 236 receiveSourceEventHandler(); 238 237 }); 239 dispatch_source_set_cancel_handler(m_receiveSource, [connection, receivePort = m_receivePort] { 240 #if PLATFORM(WATCHOS) 241 UNUSED_PARAM(connection); 242 #else 243 mach_port_unguard(mach_task_self(), receivePort, reinterpret_cast<mach_port_context_t>(connection.get())); 238 dispatch_source_set_cancel_handler(m_receiveSource, [protectedThis = makeRefPtr(this), receivePort = m_receivePort] { 239 #if !PLATFORM(WATCHOS) 240 mach_port_unguard(mach_task_self(), receivePort, reinterpret_cast<mach_port_context_t>(protectedThis.get())); 244 241 #endif 245 242 mach_port_mod_refs(mach_task_self(), receivePort, MACH_PORT_RIGHT_RECEIVE, -1); … … 299 296 auto attachments = encoder->releaseAttachments(); 300 297 301 auto numberOfPortDescriptors = std::count_if(attachments.begin(), attachments.end(), [](auto& attachment) { return attachment.type() == Attachment::MachPortType; }); 298 auto numberOfPortDescriptors = std::count_if(attachments.begin(), attachments.end(), [](auto& attachment) 299 { 300 return attachment.type() == Attachment::MachPortType; 301 }); 302 302 303 bool messageBodyIsOOL = false; 303 304 auto messageSize = MachMessage::messageSize(encoder->bufferSize(), numberOfPortDescriptors, messageBodyIsOOL); … … 365 366 m_isInitializingSendSource = true; 366 367 367 RefPtr<Connection> connection(this); 368 dispatch_source_set_registration_handler(m_sendSource, [connection] { 369 if (!connection->m_sendSource) 368 dispatch_source_set_registration_handler(m_sendSource, [this, protectedThis = makeRefPtr(this)] { 369 if (!m_sendSource) 370 370 return; 371 connection->m_isInitializingSendSource = false;372 connection->resumeSendSource();371 m_isInitializingSendSource = false; 372 resumeSendSource(); 373 373 }); 374 dispatch_source_set_event_handler(m_sendSource, [ connection] {375 if (! connection->m_sendSource)374 dispatch_source_set_event_handler(m_sendSource, [this, protectedThis = makeRefPtr(this)] { 375 if (!m_sendSource) 376 376 return; 377 377 378 unsigned long data = dispatch_source_get_data( connection->m_sendSource);378 unsigned long data = dispatch_source_get_data(m_sendSource); 379 379 380 380 if (data & DISPATCH_MACH_SEND_DEAD) { 381 connection ->connectionDidClose();381 connectionDidClose(); 382 382 return; 383 383 } … … 385 385 if (data & DISPATCH_MACH_SEND_POSSIBLE) { 386 386 // FIXME: Figure out why we get spurious DISPATCH_MACH_SEND_POSSIBLE events. 387 connection->resumeSendSource();387 resumeSendSource(); 388 388 return; 389 389 } -
trunk/Source/WebKit/Platform/IPC/cocoa/ImportanceAssertion.h
r245020 r245021 24 24 */ 25 25 26 #ifndef ImportanceAssertion_h 27 #define ImportanceAssertion_h 26 #pragma once 28 27 29 28 #if PLATFORM(MAC) … … 63 62 64 63 #endif // PLATFORM(MAC) 65 66 #endif // ImportanceAssertion_h -
trunk/Source/WebKit/Platform/IPC/cocoa/MachPort.h
r245020 r245021 24 24 */ 25 25 26 #ifndef MachPort_h 27 #define MachPort_h 26 #pragma once 28 27 29 28 #include "Attachment.h" … … 72 71 73 72 } // namespace IPC 74 75 #endif // MachPort_h -
trunk/Source/WebKit/PlatformMac.cmake
r244292 r245021 43 43 NetworkProcess/mac/RemoteNetworkingContext.mm 44 44 45 Platform/IPC/ mac/ConnectionMac.mm46 Platform/IPC/ mac/MachMessage.cpp45 Platform/IPC/cocoa/ConnectionCocoa.mm 46 Platform/IPC/cocoa/MachMessage.cpp 47 47 48 48 Platform/cf/ModuleCF.cpp -
trunk/Source/WebKit/SourcesCocoa.txt
r244921 r245021 75 75 Platform/ios/PaymentAuthorizationController.mm 76 76 77 Platform/IPC/ mac/ConnectionMac.mm78 Platform/IPC/ mac/MachMessage.cpp77 Platform/IPC/cocoa/ConnectionCocoa.mm 78 Platform/IPC/cocoa/MachMessage.cpp 79 79 80 80 Platform/mac/LayerHostingContext.mm -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r244955 r245021 2064 2064 1A2D956E12848564001EB962 /* AuxiliaryProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AuxiliaryProcess.cpp; sourceTree = "<group>"; }; 2065 2065 1A30066C1110F4F70031937C /* ResponsivenessTimer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ResponsivenessTimer.h; sourceTree = "<group>"; }; 2066 1A30EAC5115D7DA30053E937 /* Connection Mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConnectionMac.mm; sourceTree = "<group>"; };2066 1A30EAC5115D7DA30053E937 /* ConnectionCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ConnectionCocoa.mm; sourceTree = "<group>"; }; 2067 2067 1A334DEA16DE8B68006A8E38 /* StorageAreaMap.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = StorageAreaMap.messages.in; sourceTree = "<group>"; }; 2068 2068 1A334DEB16DE8F88006A8E38 /* StorageAreaMapMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StorageAreaMapMessageReceiver.cpp; path = DerivedSources/WebKit2/StorageAreaMapMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; }; … … 5491 5491 isa = PBXGroup; 5492 5492 children = ( 5493 BCC56F751159955E001CCAF9 /* mac*/,5493 BCC56F751159955E001CCAF9 /* cocoa */, 5494 5494 1AEFD27811D16C81008219D3 /* ArgumentCoder.h */, 5495 5495 1A3D610413A7F03A00F95D4E /* ArgumentCoders.cpp */, … … 8333 8333 sourceTree = "<group>"; 8334 8334 }; 8335 BCC56F751159955E001CCAF9 /* mac*/ = {8336 isa = PBXGroup; 8337 children = ( 8338 1A30EAC5115D7DA30053E937 /* Connection Mac.mm */,8335 BCC56F751159955E001CCAF9 /* cocoa */ = { 8336 isa = PBXGroup; 8337 children = ( 8338 1A30EAC5115D7DA30053E937 /* ConnectionCocoa.mm */, 8339 8339 1A1EC69D1872092100B951F0 /* ImportanceAssertion.h */, 8340 8340 1A6D86BF1DF75265007745E8 /* MachMessage.cpp */, … … 8342 8342 BCC56F771159957D001CCAF9 /* MachPort.h */, 8343 8343 ); 8344 path = mac;8344 path = cocoa; 8345 8345 sourceTree = "<group>"; 8346 8346 };
Note: See TracChangeset
for help on using the changeset viewer.