Changeset 139919 in webkit
- Timestamp:
- Jan 16, 2013 1:47:45 PM (11 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r139899 r139919 1 2013-01-16 Anders Carlsson <andersca@apple.com> 2 3 Remove CoreIPCMessageKinds.h 4 https://bugs.webkit.org/show_bug.cgi?id=107048 5 6 Reviewed by Beth Dakin. 7 8 Use named IPC messages instead. 9 10 * Platform/CoreIPC/Connection.cpp: 11 (CoreIPC::Connection::sendSyncReply): 12 (CoreIPC::Connection::processIncomingMessage): 13 (CoreIPC::Connection::dispatchSyncMessage): 14 * Platform/CoreIPC/CoreIPCMessageKinds.h: Removed. 15 * Platform/CoreIPC/MessageID.h: 16 (MessageID): 17 (CoreIPC::MessageID::stripMostSignificantBit): 18 (CoreIPC::MessageID::operator==): 19 * Platform/CoreIPC/mac/ConnectionMac.cpp: 20 (CoreIPC::Connection::open): 21 (CoreIPC::Connection::receiveSourceEventHandler): 22 * WebKit2.xcodeproj/project.pbxproj: 23 1 24 2013-01-15 Jer Noble <jer.noble@apple.com> 2 25 -
trunk/Source/WebKit2/Platform/CoreIPC/Connection.cpp
r139515 r139919 28 28 29 29 #include "BinarySemaphore.h" 30 #include "CoreIPCMessageKinds.h"31 30 #include <WebCore/RunLoop.h> 32 31 #include <wtf/CurrentTime.h> … … 339 338 bool Connection::sendSyncReply(PassOwnPtr<MessageEncoder> encoder) 340 339 { 341 return sendMessage(MessageID( CoreIPCMessage::SyncMessageReply), encoder);340 return sendMessage(MessageID(), encoder); 342 341 } 343 342 … … 573 572 void Connection::processIncomingMessage(MessageID messageID, PassOwnPtr<MessageDecoder> decoder) 574 573 { 575 // Check if this is a sync reply. 576 if (messageID == MessageID(CoreIPCMessage::SyncMessageReply)) { 574 if (decoder->messageReceiverName() == "IPC" && decoder->messageName() == "SyncMessageReply") { 577 575 processIncomingSyncReply(decoder); 578 576 return; … … 698 696 } 699 697 700 OwnPtr<MessageEncoder> replyEncoder = MessageEncoder::create("IPC", " ", syncRequestID);698 OwnPtr<MessageEncoder> replyEncoder = MessageEncoder::create("IPC", "SyncMessageReply", syncRequestID); 701 699 702 700 // Hand off both the decoder and encoder to the client. -
trunk/Source/WebKit2/Platform/CoreIPC/MessageID.h
r139009 r139919 32 32 MessageClassInvalid = 0, 33 33 34 // Messages sent by Core IPC.35 MessageClassCoreIPC,36 37 34 // Messages sent by the UI process to the web process. 38 35 MessageClassAuthenticationManager, … … 202 199 } 203 200 204 template <typename EnumType>205 bool operator==(EnumType messageKind) const206 {207 return m_messageID == MessageID(messageKind).m_messageID;208 }209 201 210 202 static MessageID fromInt(unsigned i) … … 221 213 bool isSync() const { return getFlags() & SyncMessage; } 222 214 223 MessageClass messageClass() const224 {225 return static_cast<MessageClass>(getClass());226 }227 228 215 private: 229 216 static inline unsigned stripMostSignificantBit(unsigned value) … … 232 219 } 233 220 221 MessageClass messageClass() const 222 { 223 return static_cast<MessageClass>(getClass()); 224 } 225 226 template <typename EnumType> 227 bool operator==(EnumType messageKind) const 228 { 229 return m_messageID == MessageID(messageKind).m_messageID; 230 } 231 234 232 unsigned char getFlags() const { return (m_messageID & 0xff000000) >> 24; } 235 233 unsigned char getClass() const { return (m_messageID & 0x00ff0000) >> 16; } -
trunk/Source/WebKit2/Platform/CoreIPC/mac/ConnectionMac.cpp
r136190 r139919 27 27 #include "Connection.h" 28 28 29 #include "CoreIPCMessageKinds.h"30 29 #include "DataReference.h" 31 30 #include "MachPort.h" … … 39 38 #endif 40 39 41 using namespace std;42 40 using namespace WebCore; 43 41 … … 117 115 118 116 // Send the initialize message, which contains a send right for the server to use. 119 OwnPtr<MessageEncoder> encoder = MessageEncoder::create("IPC", " ", 0);117 OwnPtr<MessageEncoder> encoder = MessageEncoder::create("IPC", "InitializeConnection", 0); 120 118 encoder->encode(MachPort(m_receivePort, MACH_MSG_TYPE_MAKE_SEND)); 121 119 122 sendMessage(MessageID( CoreIPCMessage::InitializeConnection), encoder.release());120 sendMessage(MessageID(), encoder.release()); 123 121 124 122 // Set the dead name handler for our send port. 125 123 initializeDeadNameSource(); 126 124 } 127 125 128 126 // Change the message queue length for the receive port. 129 127 setMachPortQueueLength(m_receivePort, MACH_PORT_QLIMIT_LARGE); … … 136 134 m_connectionQueue.registerMachPortEventHandler(m_exceptionPort, WorkQueue::MachPortDataAvailable, bind(&Connection::exceptionSourceEventHandler, this)); 137 135 138 OwnPtr<MessageEncoder> encoder = MessageEncoder::create("IPC", " ", 0);136 OwnPtr<MessageEncoder> encoder = MessageEncoder::create("IPC", "SetExceptionPort", 0); 139 137 encoder->encode(MachPort(m_exceptionPort, MACH_MSG_TYPE_MAKE_SEND)); 140 138 141 sendMessage(MessageID( CoreIPCMessage::SetExceptionPort), encoder.release());139 sendMessage(MessageID(), encoder.release()); 142 140 } 143 141 … … 369 367 ASSERT(decoder); 370 368 371 if ( messageID == MessageID(CoreIPCMessage::InitializeConnection)) {369 if (decoder->messageReceiverName() == "IPC" && decoder->messageName() == "InitializeConnection") { 372 370 ASSERT(m_isServer); 373 371 ASSERT(!m_isConnected); … … 394 392 } 395 393 396 if ( messageID == MessageID(CoreIPCMessage::SetExceptionPort)) {394 if (decoder->messageReceiverName() == "IPC" && decoder->messageName() == "SetExceptionPort") { 397 395 MachPort exceptionPort; 398 396 if (!decoder->decode(exceptionPort)) -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r139888 r139919 647 647 BC111B5D112F629800337BAB /* WebEventFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = BC111B5B112F629800337BAB /* WebEventFactory.h */; }; 648 648 BC111B5E112F629800337BAB /* WebEventFactory.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC111B5C112F629800337BAB /* WebEventFactory.mm */; }; 649 BC131BC911726C2800B69727 /* CoreIPCMessageKinds.h in Headers */ = {isa = PBXBuildFile; fileRef = BC131BC811726C2800B69727 /* CoreIPCMessageKinds.h */; };650 649 BC14DF77120B5B7900826C0C /* InjectedBundleScriptWorld.h in Headers */ = {isa = PBXBuildFile; fileRef = BC14DF75120B5B7900826C0C /* InjectedBundleScriptWorld.h */; }; 651 650 BC14DF78120B5B7900826C0C /* InjectedBundleScriptWorld.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC14DF76120B5B7900826C0C /* InjectedBundleScriptWorld.cpp */; }; … … 1934 1933 BC122FA3132707F300F7EAC1 /* PluginProcess.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = PluginProcess.xcconfig; sourceTree = "<group>"; }; 1935 1934 BC122FA61327087400F7EAC1 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = PluginProcess/Info.plist; sourceTree = "<group>"; }; 1936 BC131BC811726C2800B69727 /* CoreIPCMessageKinds.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreIPCMessageKinds.h; sourceTree = "<group>"; };1937 1935 BC14DF75120B5B7900826C0C /* InjectedBundleScriptWorld.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundleScriptWorld.h; sourceTree = "<group>"; }; 1938 1936 BC14DF76120B5B7900826C0C /* InjectedBundleScriptWorld.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundleScriptWorld.cpp; sourceTree = "<group>"; }; … … 2984 2982 BC032DA210F437D10058C15A /* Connection.cpp */, 2985 2983 BC032DA310F437D10058C15A /* Connection.h */, 2986 BC131BC811726C2800B69727 /* CoreIPCMessageKinds.h */,2987 2984 1A8EFDFD1253CB6E00F7067F /* DataReference.cpp */, 2988 2985 1A8EFDF91253CAA200F7067F /* DataReference.h */, … … 4571 4568 BC032DAB10F437D10058C15A /* Connection.h in Headers */, 4572 4569 5136183E163126DA00A99DDE /* ConnectionStack.h in Headers */, 4573 BC131BC911726C2800B69727 /* CoreIPCMessageKinds.h in Headers */,4574 4570 B878B615133428DC006888E9 /* CorrectionPanel.h in Headers */, 4575 4571 2989A414167D184B004F96D2 /* CustomProtocolManager.h in Headers */,
Note: See TracChangeset
for help on using the changeset viewer.