Changeset 64877 in webkit
- Timestamp:
- Aug 6, 2010 4:04:20 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 36 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r64875 r64877 1 2010-08-06 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Change all ArgumentEncoder and ArgumentDecoder references to pointers 6 https://bugs.webkit.org/show_bug.cgi?id=43651 7 8 * Platform/CoreIPC/ArgumentCoder.h: 9 * Platform/CoreIPC/ArgumentDecoder.h: 10 * Platform/CoreIPC/Arguments.h: 11 * Platform/CoreIPC/Attachment.cpp: 12 * Platform/CoreIPC/Attachment.h: 13 * Platform/CoreIPC/mac/MachPort.h: 14 * Platform/SharedMemory.h: 15 * Platform/mac/SharedMemoryMac.cpp: 16 * Shared/DrawingAreaBase.cpp: 17 * Shared/DrawingAreaBase.h: 18 * Shared/WebEvent.h: 19 * Shared/WebNavigationDataStore.h: 20 * Shared/WebPreferencesStore.h: 21 * Shared/mac/UpdateChunk.cpp: 22 * Shared/mac/UpdateChunk.h: 23 * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: 24 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: 25 * UIProcess/DrawingAreaProxy.h: 26 * UIProcess/LayerBackedDrawingAreaProxy.cpp: 27 * UIProcess/LayerBackedDrawingAreaProxy.h: 28 * UIProcess/WebContext.cpp: 29 * UIProcess/WebContext.h: 30 * UIProcess/WebPageProxy.cpp: 31 * UIProcess/WebPageProxy.h: 32 * UIProcess/WebProcessProxy.cpp: 33 * WebProcess/InjectedBundle/InjectedBundle.cpp: 34 * WebProcess/InjectedBundle/InjectedBundle.h: 35 * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: 36 * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: 37 * WebProcess/WebPage/DrawingArea.h: 38 * WebProcess/WebPage/LayerBackedDrawingArea.cpp: 39 * WebProcess/WebPage/LayerBackedDrawingArea.h: 40 * WebProcess/WebPage/WebPage.cpp: 41 * WebProcess/WebPage/WebPage.h: 42 * WebProcess/WebProcess.cpp: 43 1 44 2010-08-06 Anders Carlsson <andersca@apple.com> 2 45 -
trunk/WebKit2/Platform/CoreIPC/ArgumentCoder.h
r61635 r64877 37 37 static void encode(ArgumentEncoder* encoder, const T& t) 38 38 { 39 t.encode( *encoder);39 t.encode(encoder); 40 40 } 41 41 42 42 static bool decode(ArgumentDecoder* decoder, T& t) 43 43 { 44 return T::decode( *decoder, t);44 return T::decode(decoder, t); 45 45 } 46 46 }; -
trunk/WebKit2/Platform/CoreIPC/ArgumentDecoder.h
r64875 r64877 80 80 81 81 private: 82 ArgumentDecoder(const ArgumentDecoder &);83 ArgumentDecoder & operator=(const ArgumentDecoder&);82 ArgumentDecoder(const ArgumentDecoder*); 83 ArgumentDecoder* operator=(const ArgumentDecoder*); 84 84 85 85 void initialize(const uint8_t* buffer, size_t bufferSize); -
trunk/WebKit2/Platform/CoreIPC/Arguments.h
r57307 r64877 34 34 class Arguments0 { 35 35 public: 36 void encode(ArgumentEncoder &) const37 { 38 } 39 40 static bool decode(ArgumentDecoder &, Arguments0&)36 void encode(ArgumentEncoder*) const 37 { 38 } 39 40 static bool decode(ArgumentDecoder*, Arguments0&) 41 41 { 42 42 return true; … … 61 61 } 62 62 63 void encode(ArgumentEncoder &encoder) const64 { 65 encoder .encode(m_value);66 } 67 68 static bool decode(ArgumentDecoder &decoder, Arguments1<T1>& result)69 { 70 return decoder .decode(result.m_value);63 void encode(ArgumentEncoder* encoder) const 64 { 65 encoder->encode(m_value); 66 } 67 68 static bool decode(ArgumentDecoder* decoder, Arguments1<T1>& result) 69 { 70 return decoder->decode(result.m_value); 71 71 } 72 72 … … 93 93 } 94 94 95 void encode(ArgumentEncoder &encoder) const95 void encode(ArgumentEncoder* encoder) const 96 96 { 97 97 Arguments1<T1>::encode(encoder); 98 encoder .encode(m_value);99 } 100 101 static bool decode(ArgumentDecoder &decoder, Arguments2<T1, T2>& result)98 encoder->encode(m_value); 99 } 100 101 static bool decode(ArgumentDecoder* decoder, Arguments2<T1, T2>& result) 102 102 { 103 103 if (!Arguments1<T1>::decode(decoder, result)) 104 104 return false; 105 105 106 return decoder .decode(result.m_value);106 return decoder->decode(result.m_value); 107 107 } 108 108 … … 129 129 } 130 130 131 void encode(ArgumentEncoder &encoder) const131 void encode(ArgumentEncoder* encoder) const 132 132 { 133 133 Arguments2<T1, T2>::encode(encoder); 134 encoder .encode(m_value);135 } 136 137 static bool decode(ArgumentDecoder &decoder, Arguments3<T1, T2, T3>& result)134 encoder->encode(m_value); 135 } 136 137 static bool decode(ArgumentDecoder* decoder, Arguments3<T1, T2, T3>& result) 138 138 { 139 139 if (!Arguments2<T1, T2>::decode(decoder, result)) 140 140 return false; 141 141 142 return decoder .decode(result.m_value);142 return decoder->decode(result.m_value); 143 143 } 144 144 … … 165 165 } 166 166 167 void encode(ArgumentEncoder &encoder) const167 void encode(ArgumentEncoder* encoder) const 168 168 { 169 169 Arguments3<T1, T2, T3>::encode(encoder); 170 encoder .encode(m_value);171 } 172 173 static bool decode(ArgumentDecoder &decoder, Arguments4<T1, T2, T3, T4>& result)170 encoder->encode(m_value); 171 } 172 173 static bool decode(ArgumentDecoder* decoder, Arguments4<T1, T2, T3, T4>& result) 174 174 { 175 175 if (!Arguments3<T1, T2, T3>::decode(decoder, result)) 176 176 return false; 177 177 178 return decoder .decode(result.m_value);178 return decoder->decode(result.m_value); 179 179 } 180 180 … … 201 201 } 202 202 203 void encode(ArgumentEncoder &encoder) const203 void encode(ArgumentEncoder* encoder) const 204 204 { 205 205 Arguments4<T1, T2, T3, T4>::encode(encoder); 206 encoder .encode(m_value);207 } 208 209 static bool decode(ArgumentDecoder &decoder, Arguments5<T1, T2, T3, T4, T5>& result)206 encoder->encode(m_value); 207 } 208 209 static bool decode(ArgumentDecoder* decoder, Arguments5<T1, T2, T3, T4, T5>& result) 210 210 { 211 211 if (!Arguments4<T1, T2, T3, T4>::decode(decoder, result)) 212 212 return false; 213 213 214 return decoder .decode(result.m_value);214 return decoder->decode(result.m_value); 215 215 } 216 216 -
trunk/WebKit2/Platform/CoreIPC/Attachment.cpp
r57359 r64877 59 59 #endif 60 60 61 void Attachment::encode(ArgumentEncoder &encoder) const61 void Attachment::encode(ArgumentEncoder* encoder) const 62 62 { 63 encoder .addAttachment(*this);63 encoder->addAttachment(*this); 64 64 } 65 65 66 bool Attachment::decode(ArgumentDecoder &decoder, Attachment& attachment)66 bool Attachment::decode(ArgumentDecoder* decoder, Attachment& attachment) 67 67 { 68 if (!decoder .removeAttachment(attachment))68 if (!decoder->removeAttachment(attachment)) 69 69 return false; 70 70 return true; -
trunk/WebKit2/Platform/CoreIPC/Attachment.h
r57307 r64877 65 65 #endif 66 66 67 void encode(ArgumentEncoder &) const;68 static bool decode(ArgumentDecoder &, Attachment&);67 void encode(ArgumentEncoder*) const; 68 static bool decode(ArgumentDecoder*, Attachment&); 69 69 70 70 private: -
trunk/WebKit2/Platform/CoreIPC/mac/MachPort.h
r57307 r64877 45 45 } 46 46 47 void encode(ArgumentEncoder &encoder) const47 void encode(ArgumentEncoder* encoder) const 48 48 { 49 encoder .encode(Attachment(m_port, m_disposition));49 encoder->encode(Attachment(m_port, m_disposition)); 50 50 } 51 51 52 static bool decode(ArgumentDecoder &decoder, MachPort& p)52 static bool decode(ArgumentDecoder* decoder, MachPort& p) 53 53 { 54 54 Attachment attachment; 55 if (!decoder .decode(attachment))55 if (!decoder->decode(attachment)) 56 56 return false; 57 57 -
trunk/WebKit2/Platform/SharedMemory.h
r64765 r64877 50 50 ~Handle(); 51 51 52 void encode(CoreIPC::ArgumentEncoder &) const;53 static bool decode(CoreIPC::ArgumentDecoder &, Handle&);52 void encode(CoreIPC::ArgumentEncoder*) const; 53 static bool decode(CoreIPC::ArgumentDecoder*, Handle&); 54 54 55 55 private: -
trunk/WebKit2/Platform/mac/SharedMemoryMac.cpp
r64776 r64877 49 49 } 50 50 51 void SharedMemory::Handle::encode(CoreIPC::ArgumentEncoder &encoder) const51 void SharedMemory::Handle::encode(CoreIPC::ArgumentEncoder* encoder) const 52 52 { 53 53 ASSERT(m_port); 54 54 ASSERT(m_size); 55 55 56 encoder .encodeUInt64(m_size);57 encoder .encode(CoreIPC::MachPort(m_port, MACH_MSG_TYPE_COPY_SEND));56 encoder->encodeUInt64(m_size); 57 encoder->encode(CoreIPC::MachPort(m_port, MACH_MSG_TYPE_COPY_SEND)); 58 58 m_port = MACH_PORT_NULL; 59 59 } 60 60 61 bool SharedMemory::Handle::decode(CoreIPC::ArgumentDecoder &decoder, Handle& handle)61 bool SharedMemory::Handle::decode(CoreIPC::ArgumentDecoder* decoder, Handle& handle) 62 62 { 63 63 ASSERT(!handle.m_port); … … 65 65 66 66 uint64_t size; 67 if (!decoder .decodeUInt64(size))67 if (!decoder->decodeUInt64(size)) 68 68 return false; 69 69 70 70 CoreIPC::MachPort machPort; 71 if (!decoder .decode(CoreIPC::Out(machPort)))71 if (!decoder->decode(CoreIPC::Out(machPort))) 72 72 return false; 73 73 -
trunk/WebKit2/Shared/DrawingAreaBase.cpp
r64594 r64877 28 28 namespace WebKit { 29 29 30 void DrawingAreaBase::encode(CoreIPC::ArgumentEncoder &encoder) const30 void DrawingAreaBase::encode(CoreIPC::ArgumentEncoder* encoder) const 31 31 { 32 32 DrawingAreaInfo info(type(), id()); 33 encoder .encode(info);33 encoder->encode(info); 34 34 } 35 35 36 bool DrawingAreaBase::decode(CoreIPC::ArgumentDecoder &decoder, DrawingAreaInfo& info)36 bool DrawingAreaBase::decode(CoreIPC::ArgumentDecoder* decoder, DrawingAreaInfo& info) 37 37 { 38 38 uint32_t drawingAreaType; 39 if (!decoder .decode(drawingAreaType))39 if (!decoder->decode(drawingAreaType)) 40 40 return false; 41 41 42 42 DrawingAreaID drawingAreaID; 43 if (!decoder .decode(drawingAreaID))43 if (!decoder->decode(drawingAreaID)) 44 44 return false; 45 45 -
trunk/WebKit2/Shared/DrawingAreaBase.h
r64867 r64877 66 66 67 67 // The DrawingAreaProxy should never be decoded itself. Instead, the DrawingArea should be decoded. 68 void encode(CoreIPC::ArgumentEncoder &encoder) const;69 static bool decode(CoreIPC::ArgumentDecoder &, DrawingAreaInfo&);68 void encode(CoreIPC::ArgumentEncoder* encoder) const; 69 static bool decode(CoreIPC::ArgumentDecoder*, DrawingAreaInfo&); 70 70 71 71 protected: -
trunk/WebKit2/Shared/WebEvent.h
r64063 r64877 83 83 } 84 84 85 void encode(CoreIPC::ArgumentEncoder &encoder) const86 { 87 encoder .encode(m_type);88 encoder .encode(m_modifiers);89 encoder .encode(m_timestamp);90 } 91 92 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebEvent& t)93 { 94 if (!decoder .decode(t.m_type))95 return false; 96 if (!decoder .decode(t.m_modifiers))97 return false; 98 if (!decoder .decode(t.m_timestamp))85 void encode(CoreIPC::ArgumentEncoder* encoder) const 86 { 87 encoder->encode(m_type); 88 encoder->encode(m_modifiers); 89 encoder->encode(m_timestamp); 90 } 91 92 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebEvent& t) 93 { 94 if (!decoder->decode(t.m_type)) 95 return false; 96 if (!decoder->decode(t.m_modifiers)) 97 return false; 98 if (!decoder->decode(t.m_timestamp)) 99 99 return false; 100 100 … … 146 146 int clickCount() const { return m_clickCount; } 147 147 148 void encode(CoreIPC::ArgumentEncoder &encoder) const149 { 150 encoder .encodeBytes(reinterpret_cast<const uint8_t*>(this), sizeof(*this));151 } 152 153 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebMouseEvent& t)154 { 155 return decoder .decodeBytes(reinterpret_cast<uint8_t*>(&t), sizeof(t));148 void encode(CoreIPC::ArgumentEncoder* encoder) const 149 { 150 encoder->encodeBytes(reinterpret_cast<const uint8_t*>(this), sizeof(*this)); 151 } 152 153 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebMouseEvent& t) 154 { 155 return decoder->decodeBytes(reinterpret_cast<uint8_t*>(&t), sizeof(t)); 156 156 } 157 157 … … 209 209 Granularity granularity() const { return (Granularity)m_granularity; } 210 210 211 void encode(CoreIPC::ArgumentEncoder &encoder) const212 { 213 encoder .encodeBytes(reinterpret_cast<const uint8_t*>(this), sizeof(*this));214 } 215 216 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebWheelEvent& t)217 { 218 return decoder .decodeBytes(reinterpret_cast<uint8_t*>(&t), sizeof(t));211 void encode(CoreIPC::ArgumentEncoder* encoder) const 212 { 213 encoder->encodeBytes(reinterpret_cast<const uint8_t*>(this), sizeof(*this)); 214 } 215 216 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebWheelEvent& t) 217 { 218 return decoder->decodeBytes(reinterpret_cast<uint8_t*>(&t), sizeof(t)); 219 219 } 220 220 … … 265 265 bool isSystemKey() const { return m_isSystemKey; } 266 266 267 void encode(CoreIPC::ArgumentEncoder &encoder) const267 void encode(CoreIPC::ArgumentEncoder* encoder) const 268 268 { 269 269 WebEvent::encode(encoder); 270 270 271 encoder .encode(m_text);272 encoder .encode(m_unmodifiedText);273 encoder .encode(m_keyIdentifier);274 encoder .encode(m_windowsVirtualKeyCode);275 encoder .encode(m_nativeVirtualKeyCode);276 encoder .encode(m_isAutoRepeat);277 encoder .encode(m_isKeypad);278 encoder .encode(m_isSystemKey);279 } 280 281 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebKeyboardEvent& t)271 encoder->encode(m_text); 272 encoder->encode(m_unmodifiedText); 273 encoder->encode(m_keyIdentifier); 274 encoder->encode(m_windowsVirtualKeyCode); 275 encoder->encode(m_nativeVirtualKeyCode); 276 encoder->encode(m_isAutoRepeat); 277 encoder->encode(m_isKeypad); 278 encoder->encode(m_isSystemKey); 279 } 280 281 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebKeyboardEvent& t) 282 282 { 283 283 if (!WebEvent::decode(decoder, t)) … … 285 285 286 286 WebCore::String text; 287 if (!decoder .decode(text))287 if (!decoder->decode(text)) 288 288 return false; 289 289 t.m_text = text; 290 290 291 291 WebCore::String unmodifiedText; 292 if (!decoder .decode(unmodifiedText))292 if (!decoder->decode(unmodifiedText)) 293 293 return false; 294 294 t.m_unmodifiedText = unmodifiedText; 295 295 296 296 WebCore::String keyIdentifier; 297 if (!decoder .decode(keyIdentifier))297 if (!decoder->decode(keyIdentifier)) 298 298 return false; 299 299 t.m_keyIdentifier = keyIdentifier; 300 300 301 if (!decoder .decode(t.m_windowsVirtualKeyCode))302 return false; 303 if (!decoder .decode(t.m_nativeVirtualKeyCode))304 return false; 305 if (!decoder .decode(t.m_isAutoRepeat))306 return false; 307 if (!decoder .decode(t.m_isKeypad))308 return false; 309 if (!decoder .decode(t.m_isSystemKey))301 if (!decoder->decode(t.m_windowsVirtualKeyCode)) 302 return false; 303 if (!decoder->decode(t.m_nativeVirtualKeyCode)) 304 return false; 305 if (!decoder->decode(t.m_isAutoRepeat)) 306 return false; 307 if (!decoder->decode(t.m_isKeypad)) 308 return false; 309 if (!decoder->decode(t.m_isSystemKey)) 310 310 return false; 311 311 return true; -
trunk/WebKit2/Shared/WebNavigationDataStore.h
r61719 r64877 35 35 36 36 struct WebNavigationDataStore { 37 void encode(CoreIPC::ArgumentEncoder &encoder) const37 void encode(CoreIPC::ArgumentEncoder* encoder) const 38 38 { 39 encoder .encode(url);40 encoder .encode(title);39 encoder->encode(url); 40 encoder->encode(title); 41 41 } 42 42 43 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebNavigationDataStore& store)43 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebNavigationDataStore& store) 44 44 { 45 if (!decoder .decode(store.url))45 if (!decoder->decode(store.url)) 46 46 return false; 47 if (!decoder .decode(store.title))47 if (!decoder->decode(store.title)) 48 48 return false; 49 49 return true; -
trunk/WebKit2/Shared/WebPreferencesStore.h
r63682 r64877 40 40 void swap(WebPreferencesStore&); 41 41 42 void encode(CoreIPC::ArgumentEncoder &encoder) const42 void encode(CoreIPC::ArgumentEncoder* encoder) const 43 43 { 44 encoder .encode(javaScriptEnabled);45 encoder .encode(loadsImagesAutomatically);46 encoder .encode(pluginsEnabled);47 encoder .encode(offlineWebApplicationCacheEnabled);48 encoder .encode(localStorageEnabled);49 encoder .encode(minimumFontSize);50 encoder .encode(minimumLogicalFontSize);51 encoder .encode(defaultFontSize);52 encoder .encode(defaultFixedFontSize);53 encoder .encode(standardFontFamily);54 encoder .encode(cursiveFontFamily);55 encoder .encode(fantasyFontFamily);56 encoder .encode(fixedFontFamily);57 encoder .encode(sansSerifFontFamily);58 encoder .encode(serifFontFamily);44 encoder->encode(javaScriptEnabled); 45 encoder->encode(loadsImagesAutomatically); 46 encoder->encode(pluginsEnabled); 47 encoder->encode(offlineWebApplicationCacheEnabled); 48 encoder->encode(localStorageEnabled); 49 encoder->encode(minimumFontSize); 50 encoder->encode(minimumLogicalFontSize); 51 encoder->encode(defaultFontSize); 52 encoder->encode(defaultFixedFontSize); 53 encoder->encode(standardFontFamily); 54 encoder->encode(cursiveFontFamily); 55 encoder->encode(fantasyFontFamily); 56 encoder->encode(fixedFontFamily); 57 encoder->encode(sansSerifFontFamily); 58 encoder->encode(serifFontFamily); 59 59 } 60 60 61 static bool decode(CoreIPC::ArgumentDecoder &decoder, WebPreferencesStore& s)61 static bool decode(CoreIPC::ArgumentDecoder* decoder, WebPreferencesStore& s) 62 62 { 63 if (!decoder .decode(s.javaScriptEnabled))63 if (!decoder->decode(s.javaScriptEnabled)) 64 64 return false; 65 if (!decoder .decode(s.loadsImagesAutomatically))65 if (!decoder->decode(s.loadsImagesAutomatically)) 66 66 return false; 67 if (!decoder .decode(s.pluginsEnabled))67 if (!decoder->decode(s.pluginsEnabled)) 68 68 return false; 69 if (!decoder .decode(s.offlineWebApplicationCacheEnabled))69 if (!decoder->decode(s.offlineWebApplicationCacheEnabled)) 70 70 return false; 71 if (!decoder .decode(s.localStorageEnabled))71 if (!decoder->decode(s.localStorageEnabled)) 72 72 return false; 73 if (!decoder .decode(s.minimumFontSize))73 if (!decoder->decode(s.minimumFontSize)) 74 74 return false; 75 if (!decoder .decode(s.minimumLogicalFontSize))75 if (!decoder->decode(s.minimumLogicalFontSize)) 76 76 return false; 77 if (!decoder .decode(s.defaultFontSize))77 if (!decoder->decode(s.defaultFontSize)) 78 78 return false; 79 if (!decoder .decode(s.defaultFixedFontSize))79 if (!decoder->decode(s.defaultFixedFontSize)) 80 80 return false; 81 if (!decoder .decode(s.standardFontFamily))81 if (!decoder->decode(s.standardFontFamily)) 82 82 return false; 83 if (!decoder .decode(s.cursiveFontFamily))83 if (!decoder->decode(s.cursiveFontFamily)) 84 84 return false; 85 if (!decoder .decode(s.fantasyFontFamily))85 if (!decoder->decode(s.fantasyFontFamily)) 86 86 return false; 87 if (!decoder .decode(s.fixedFontFamily))87 if (!decoder->decode(s.fixedFontFamily)) 88 88 return false; 89 if (!decoder .decode(s.sansSerifFontFamily))89 if (!decoder->decode(s.sansSerifFontFamily)) 90 90 return false; 91 if (!decoder .decode(s.serifFontFamily))91 if (!decoder->decode(s.serifFontFamily)) 92 92 return false; 93 93 return true; -
trunk/WebKit2/Shared/mac/UpdateChunk.cpp
r63400 r64877 66 66 } 67 67 68 void UpdateChunk::encode(CoreIPC::ArgumentEncoder &encoder) const68 void UpdateChunk::encode(CoreIPC::ArgumentEncoder* encoder) const 69 69 { 70 encoder .encode(m_rect);71 encoder .encode(CoreIPC::Attachment(m_data, size(), MACH_MSG_VIRTUAL_COPY, true));70 encoder->encode(m_rect); 71 encoder->encode(CoreIPC::Attachment(m_data, size(), MACH_MSG_VIRTUAL_COPY, true)); 72 72 73 73 m_data = 0; 74 74 } 75 75 76 bool UpdateChunk::decode(CoreIPC::ArgumentDecoder &decoder, UpdateChunk& chunk)76 bool UpdateChunk::decode(CoreIPC::ArgumentDecoder* decoder, UpdateChunk& chunk) 77 77 { 78 78 IntRect rect; 79 if (!decoder .decode(rect))79 if (!decoder->decode(rect)) 80 80 return false; 81 81 chunk.m_rect = rect; 82 82 83 83 CoreIPC::Attachment attachment; 84 if (!decoder .decode(attachment))84 if (!decoder->decode(attachment)) 85 85 return false; 86 86 -
trunk/WebKit2/Shared/mac/UpdateChunk.h
r63821 r64877 47 47 bool isEmpty() const { return m_rect.isEmpty(); } 48 48 49 void encode(CoreIPC::ArgumentEncoder &) const;50 static bool decode(CoreIPC::ArgumentDecoder &, UpdateChunk&);49 void encode(CoreIPC::ArgumentEncoder*) const; 50 static bool decode(CoreIPC::ArgumentDecoder*, UpdateChunk&); 51 51 52 52 RetainPtr<CGImageRef> createImage(); -
trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.cpp
r64867 r64877 63 63 OwnPtr<CoreIPC::ArgumentDecoder> arguments = page->process()->connection()->waitFor(DrawingAreaProxyMessage::DidSetSize, page->pageID(), 0.04); 64 64 if (arguments) 65 didReceiveMessage(page->process()->connection(), CoreIPC::MessageID(DrawingAreaProxyMessage::DidSetSize), *arguments.get());65 didReceiveMessage(page->process()->connection(), CoreIPC::MessageID(DrawingAreaProxyMessage::DidSetSize), arguments.get()); 66 66 } 67 67 … … 145 145 } 146 146 147 void ChunkedUpdateDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)147 void ChunkedUpdateDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 148 148 { 149 149 switch (messageID.get<DrawingAreaProxyMessage::Kind>()) { 150 150 case DrawingAreaProxyMessage::Update: { 151 151 UpdateChunk updateChunk; 152 if (!arguments .decode(updateChunk))152 if (!arguments->decode(updateChunk)) 153 153 return; 154 154 … … 158 158 case DrawingAreaProxyMessage::DidSetSize: { 159 159 UpdateChunk updateChunk; 160 if (!arguments .decode(CoreIPC::Out(updateChunk)))160 if (!arguments->decode(CoreIPC::Out(updateChunk))) 161 161 return; 162 162 -
trunk/WebKit2/UIProcess/ChunkedUpdateDrawingAreaProxy.h
r64867 r64877 62 62 63 63 // The DrawingAreaProxy should never be decoded itself. Instead, the DrawingArea should be decoded. 64 virtual void encode(CoreIPC::ArgumentEncoder &encoder) const64 virtual void encode(CoreIPC::ArgumentEncoder* encoder) const 65 65 { 66 66 DrawingAreaProxy::encode(encoder); … … 71 71 72 72 // DrawingAreaProxy 73 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);73 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 74 74 virtual void paint(const WebCore::IntRect&, PlatformDrawingContext); 75 75 virtual void setSize(const WebCore::IntSize&); -
trunk/WebKit2/UIProcess/DrawingAreaProxy.h
r64867 r64877 49 49 virtual ~DrawingAreaProxy(); 50 50 51 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &) = 0;52 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &, CoreIPC::ArgumentEncoder&) { ASSERT_NOT_REACHED(); }51 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0; 52 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*) { ASSERT_NOT_REACHED(); } 53 53 54 54 virtual void paint(const WebCore::IntRect&, PlatformDrawingContext) = 0; -
trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.cpp
r64594 r64877 119 119 } 120 120 121 void LayerBackedDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)121 void LayerBackedDrawingAreaProxy::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 122 122 { 123 123 switch (messageID.get<DrawingAreaProxyMessage::Kind>()) { … … 135 135 } 136 136 137 void LayerBackedDrawingAreaProxy::didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder & arguments, CoreIPC::ArgumentEncoder&)137 void LayerBackedDrawingAreaProxy::didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder*) 138 138 { 139 139 switch (messageID.get<DrawingAreaProxyMessage::Kind>()) { … … 141 141 case DrawingAreaProxyMessage::AttachCompositingContext: { 142 142 uint32_t contextID; 143 if (!arguments .decode(CoreIPC::Out(contextID)))143 if (!arguments->decode(CoreIPC::Out(contextID))) 144 144 return; 145 145 attachCompositingContext(contextID); -
trunk/WebKit2/UIProcess/LayerBackedDrawingAreaProxy.h
r64594 r64877 63 63 64 64 // DrawingAreaProxy 65 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);66 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &, CoreIPC::ArgumentEncoder&);65 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 66 virtual void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*); 67 67 68 68 virtual void paint(const WebCore::IntRect&, PlatformDrawingContext); -
trunk/WebKit2/UIProcess/WebContext.cpp
r64797 r64877 69 69 } 70 70 71 void encode(CoreIPC::ArgumentEncoder &encoder) const71 void encode(CoreIPC::ArgumentEncoder* encoder) const 72 72 { 73 73 APIObject::Type type = m_root->type(); 74 encoder .encode(static_cast<uint32_t>(type));74 encoder->encode(static_cast<uint32_t>(type)); 75 75 switch (type) { 76 76 case APIObject::TypeArray: { 77 77 ImmutableArray* array = static_cast<ImmutableArray*>(m_root); 78 encoder .encode(static_cast<uint64_t>(array->size()));78 encoder->encode(static_cast<uint64_t>(array->size())); 79 79 for (size_t i = 0; i < array->size(); ++i) 80 encoder .encode(PostMessageEncoder(array->at(i)));80 encoder->encode(PostMessageEncoder(array->at(i))); 81 81 break; 82 82 } 83 83 case APIObject::TypeString: { 84 84 WebString* string = static_cast<WebString*>(m_root); 85 encoder .encode(string->string());85 encoder->encode(string->string()); 86 86 break; 87 87 } 88 88 case APIObject::TypePage: { 89 89 WebPageProxy* page = static_cast<WebPageProxy*>(m_root); 90 encoder .encode(page->pageID());90 encoder->encode(page->pageID()); 91 91 break; 92 92 } … … 115 115 } 116 116 117 static bool decode(CoreIPC::ArgumentDecoder &decoder, PostMessageDecoder& coder)117 static bool decode(CoreIPC::ArgumentDecoder* decoder, PostMessageDecoder& coder) 118 118 { 119 119 uint32_t type; 120 if (!decoder .decode(type))120 if (!decoder->decode(type)) 121 121 return false; 122 122 … … 124 124 case APIObject::TypeArray: { 125 125 uint64_t size; 126 if (!decoder .decode(size))126 if (!decoder->decode(size)) 127 127 return false; 128 128 … … 133 133 APIObject* element; 134 134 PostMessageDecoder messageCoder(&element, coder.m_context); 135 if (!decoder .decode(messageCoder))135 if (!decoder->decode(messageCoder)) 136 136 return false; 137 137 array[i] = element; … … 143 143 case APIObject::TypeString: { 144 144 String string; 145 if (!decoder .decode(string))145 if (!decoder->decode(string)) 146 146 return false; 147 147 *(coder.m_root) = WebString::create(string).leakRef(); … … 150 150 case APIObject::TypeBundlePage: { 151 151 uint64_t pageID; 152 if (!decoder .decode(pageID))152 if (!decoder->decode(pageID)) 153 153 return false; 154 154 *(coder.m_root) = coder.m_context->process()->webPage(pageID); … … 398 398 } 399 399 400 void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)400 void WebContext::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 401 401 { 402 402 switch (messageID.get<WebContextMessage::Kind>()) { … … 406 406 APIObject* messageBody = 0; 407 407 PostMessageDecoder messageCoder(&messageBody, this); 408 if (!arguments .decode(CoreIPC::Out(messageName, messageCoder)))408 if (!arguments->decode(CoreIPC::Out(messageName, messageCoder))) 409 409 return; 410 410 -
trunk/WebKit2/UIProcess/WebContext.h
r64797 r64877 105 105 void addVisitedLink(WebCore::LinkHash); 106 106 107 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);107 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 108 108 109 109 private: -
trunk/WebKit2/UIProcess/WebPageProxy.cpp
r64662 r64877 389 389 } 390 390 391 void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)391 void WebPageProxy::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 392 392 { 393 393 if (messageID.is<CoreIPC::MessageClassDrawingAreaProxy>()) { … … 399 399 case WebPageProxyMessage::DidCreateMainFrame: { 400 400 uint64_t frameID; 401 if (!arguments .decode(frameID))401 if (!arguments->decode(frameID)) 402 402 return; 403 403 didCreateMainFrame(frameID); … … 406 406 case WebPageProxyMessage::DidCreateSubFrame: { 407 407 uint64_t frameID; 408 if (!arguments .decode(frameID))408 if (!arguments->decode(frameID)) 409 409 return; 410 410 didCreateSubFrame(frameID); … … 414 414 uint64_t frameID; 415 415 String url; 416 if (!arguments .decode(CoreIPC::Out(frameID, url)))416 if (!arguments->decode(CoreIPC::Out(frameID, url))) 417 417 return; 418 418 didStartProvisionalLoadForFrame(webFrame(frameID), url); … … 421 421 case WebPageProxyMessage::DidReceiveServerRedirectForProvisionalLoadForFrame: { 422 422 uint64_t frameID; 423 if (!arguments .decode(frameID))423 if (!arguments->decode(frameID)) 424 424 return; 425 425 didReceiveServerRedirectForProvisionalLoadForFrame(webFrame(frameID)); … … 428 428 case WebPageProxyMessage::DidFailProvisionalLoadForFrame: { 429 429 uint64_t frameID; 430 if (!arguments .decode(frameID))430 if (!arguments->decode(frameID)) 431 431 return; 432 432 didFailProvisionalLoadForFrame(webFrame(frameID)); … … 435 435 case WebPageProxyMessage::DidCommitLoadForFrame: { 436 436 uint64_t frameID; 437 if (!arguments .decode(frameID))437 if (!arguments->decode(frameID)) 438 438 return; 439 439 didCommitLoadForFrame(webFrame(frameID)); … … 442 442 case WebPageProxyMessage::DidFinishLoadForFrame: { 443 443 uint64_t frameID; 444 if (!arguments .decode(frameID))444 if (!arguments->decode(frameID)) 445 445 return; 446 446 didFinishLoadForFrame(webFrame(frameID)); … … 449 449 case WebPageProxyMessage::DidFailLoadForFrame: { 450 450 uint64_t frameID; 451 if (!arguments .decode(frameID))451 if (!arguments->decode(frameID)) 452 452 return; 453 453 didFailLoadForFrame(webFrame(frameID)); … … 457 457 uint64_t frameID; 458 458 String title; 459 if (!arguments .decode(CoreIPC::Out(frameID, title)))459 if (!arguments->decode(CoreIPC::Out(frameID, title))) 460 460 return; 461 461 didReceiveTitleForFrame(webFrame(frameID), title); … … 464 464 case WebPageProxyMessage::DidFirstLayoutForFrame: { 465 465 uint64_t frameID; 466 if (!arguments .decode(frameID))466 if (!arguments->decode(frameID)) 467 467 return; 468 468 didFirstLayoutForFrame(webFrame(frameID)); … … 471 471 case WebPageProxyMessage::DidFirstVisuallyNonEmptyLayoutForFrame: { 472 472 uint64_t frameID; 473 if (!arguments .decode(frameID))473 if (!arguments->decode(frameID)) 474 474 return; 475 475 didFirstVisuallyNonEmptyLayoutForFrame(webFrame(frameID)); … … 481 481 case WebPageProxyMessage::DidChangeProgress: { 482 482 double value; 483 if (!arguments .decode(value))483 if (!arguments->decode(value)) 484 484 return; 485 485 didChangeProgress(value); … … 491 491 case WebPageProxyMessage::DidReceiveEvent: { 492 492 uint32_t type; 493 if (!arguments .decode(type))493 if (!arguments->decode(type)) 494 494 return; 495 495 didReceiveEvent((WebEvent::Type)type); … … 499 499 // FIXME: Use enum here. 500 500 bool direction; 501 if (!arguments .decode(direction))501 if (!arguments->decode(direction)) 502 502 return; 503 503 takeFocus(direction); … … 509 509 String url; 510 510 uint64_t listenerID; 511 if (!arguments .decode(CoreIPC::Out(frameID, navigationType, url, listenerID)))511 if (!arguments->decode(CoreIPC::Out(frameID, navigationType, url, listenerID))) 512 512 return; 513 513 decidePolicyForNavigationAction(webFrame(frameID), static_cast<NavigationType>(navigationType), url, listenerID); … … 519 519 String url; 520 520 uint64_t listenerID; 521 if (!arguments .decode(CoreIPC::Out(frameID, navigationType, url, listenerID)))521 if (!arguments->decode(CoreIPC::Out(frameID, navigationType, url, listenerID))) 522 522 return; 523 523 decidePolicyForNewWindowAction(webFrame(frameID), static_cast<NavigationType>(navigationType), url, listenerID); … … 529 529 String url; 530 530 uint64_t listenerID; 531 if (!arguments .decode(CoreIPC::Out(frameID, MIMEType, url, listenerID)))531 if (!arguments->decode(CoreIPC::Out(frameID, MIMEType, url, listenerID))) 532 532 return; 533 533 decidePolicyForMIMEType(webFrame(frameID), MIMEType, url, listenerID); … … 537 537 String resultString; 538 538 uint64_t callbackID; 539 if (!arguments .decode(CoreIPC::Out(resultString, callbackID)))539 if (!arguments->decode(CoreIPC::Out(resultString, callbackID))) 540 540 return; 541 541 didRunJavaScriptInMainFrame(resultString, callbackID); … … 545 545 String resultString; 546 546 uint64_t callbackID; 547 if (!arguments .decode(CoreIPC::Out(resultString, callbackID)))547 if (!arguments->decode(CoreIPC::Out(resultString, callbackID))) 548 548 return; 549 549 didGetRenderTreeExternalRepresentation(resultString, callbackID); … … 552 552 case WebPageProxyMessage::SetToolTip: { 553 553 String toolTip; 554 if (!arguments .decode(toolTip))554 if (!arguments->decode(toolTip)) 555 555 return; 556 556 setToolTip(toolTip); … … 560 560 #if USE(LAZY_NATIVE_CURSOR) 561 561 Cursor cursor; 562 if (!arguments .decode(cursor))562 if (!arguments->decode(cursor)) 563 563 return; 564 564 setCursor(cursor); … … 576 576 case WebPageProxyMessage::BackForwardAddItem: { 577 577 uint64_t itemID; 578 if (!arguments .decode(CoreIPC::Out(itemID)))578 if (!arguments->decode(CoreIPC::Out(itemID))) 579 579 return; 580 580 addItemToBackForwardList(process()->webBackForwardItem(itemID)); … … 583 583 case WebPageProxyMessage::BackForwardGoToItem: { 584 584 uint64_t itemID; 585 if (!arguments .decode(CoreIPC::Out(itemID)))585 if (!arguments->decode(CoreIPC::Out(itemID))) 586 586 return; 587 587 goToItemInBackForwardList(process()->webBackForwardItem(itemID)); … … 594 594 } 595 595 596 void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder & arguments, CoreIPC::ArgumentEncoder&reply)596 void WebPageProxy::didReceiveSyncMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments, CoreIPC::ArgumentEncoder* reply) 597 597 { 598 598 if (messageID.is<CoreIPC::MessageClassDrawingAreaProxy>()) { … … 606 606 if (newPage) { 607 607 // FIXME: Pass the real size. 608 reply .encode(CoreIPC::In(newPage->pageID(), IntSize(100, 100),609 newPage->pageNamespace()->context()->preferences()->store(),610 *(newPage->drawingArea())));608 reply->encode(CoreIPC::In(newPage->pageID(), IntSize(100, 100), 609 newPage->pageNamespace()->context()->preferences()->store(), 610 *(newPage->drawingArea()))); 611 611 } else { 612 reply .encode(CoreIPC::In(static_cast<uint64_t>(0), IntSize(), WebPreferencesStore(), DrawingAreaBase::DrawingAreaInfo()));612 reply->encode(CoreIPC::In(static_cast<uint64_t>(0), IntSize(), WebPreferencesStore(), DrawingAreaBase::DrawingAreaInfo())); 613 613 } 614 614 break; … … 617 617 uint64_t frameID; 618 618 String message; 619 if (!arguments .decode(CoreIPC::Out(frameID, message)))619 if (!arguments->decode(CoreIPC::Out(frameID, message))) 620 620 return; 621 621 runJavaScriptAlert(webFrame(frameID), message); … … 626 626 uint64_t frameID; 627 627 String message; 628 if (!arguments .decode(CoreIPC::Out(frameID, message)))628 if (!arguments->decode(CoreIPC::Out(frameID, message))) 629 629 return; 630 630 631 631 bool result = runJavaScriptConfirm(webFrame(frameID), message); 632 reply .encode(CoreIPC::In(result));632 reply->encode(CoreIPC::In(result)); 633 633 break; 634 634 } … … 638 638 String message; 639 639 String defaultValue; 640 if (!arguments .decode(CoreIPC::Out(frameID, message, defaultValue)))640 if (!arguments->decode(CoreIPC::Out(frameID, message, defaultValue))) 641 641 return; 642 642 643 643 String result = runJavaScriptPrompt(webFrame(frameID), message, defaultValue); 644 reply .encode(CoreIPC::In(result));644 reply->encode(CoreIPC::In(result)); 645 645 break; 646 646 } … … 648 648 WebBackForwardListItem* currentItem = m_backForwardList->currentItem(); 649 649 uint64_t currentItemID = currentItem ? currentItem->itemID() : 0; 650 reply .encode(CoreIPC::In(currentItemID));650 reply->encode(CoreIPC::In(currentItemID)); 651 651 break; 652 652 } 653 653 case WebPageProxyMessage::BackForwardItemAtIndex: { 654 654 int itemIndex; 655 if (!arguments .decode(CoreIPC::Out(itemIndex)))655 if (!arguments->decode(CoreIPC::Out(itemIndex))) 656 656 return; 657 657 658 658 WebBackForwardListItem* item = m_backForwardList->itemAtIndex(itemIndex); 659 659 uint64_t itemID = item ? item->itemID() : 0; 660 reply .encode(CoreIPC::In(itemID));660 reply->encode(CoreIPC::In(itemID)); 661 661 break; 662 662 } 663 663 case WebPageProxyMessage::BackForwardBackListCount: { 664 664 int backListCount = m_backForwardList->backListCount(); 665 reply .encode(CoreIPC::In(backListCount));665 reply->encode(CoreIPC::In(backListCount)); 666 666 break; 667 667 } 668 668 case WebPageProxyMessage::BackForwardForwardListCount: { 669 669 int forwardListCount = m_backForwardList->forwardListCount(); 670 reply .encode(CoreIPC::In(forwardListCount));670 reply->encode(CoreIPC::In(forwardListCount)); 671 671 break; 672 672 } … … 674 674 case WebPageProxyMessage::DidChangeAcceleratedCompositing: { 675 675 bool compositing; 676 if (!arguments .decode(CoreIPC::Out(compositing)))676 if (!arguments->decode(CoreIPC::Out(compositing))) 677 677 return; 678 678 679 679 didChangeAcceleratedCompositing(compositing); 680 reply .encode(*(drawingArea()));680 reply->encode(*(drawingArea())); 681 681 break; 682 682 } -
trunk/WebKit2/UIProcess/WebPageProxy.h
r64662 r64877 141 141 void receivedPolicyDecision(WebCore::PolicyAction, WebFrameProxy*, uint64_t listenerID); 142 142 143 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);144 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &, CoreIPC::ArgumentEncoder&);143 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 144 void didReceiveSyncMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*, CoreIPC::ArgumentEncoder*); 145 145 146 146 void processDidBecomeUnresponsive(); -
trunk/WebKit2/UIProcess/WebProcessProxy.cpp
r64871 r64877 316 316 317 317 if (messageID.is<CoreIPC::MessageClassWebContext>()) { 318 m_context->didReceiveMessage(connection, messageID, *arguments);318 m_context->didReceiveMessage(connection, messageID, arguments); 319 319 return; 320 320 } … … 328 328 return; 329 329 330 pageProxy->didReceiveMessage(connection, messageID, *arguments);330 pageProxy->didReceiveMessage(connection, messageID, arguments); 331 331 } 332 332 … … 381 381 return; 382 382 383 pageProxy->didReceiveSyncMessage(connection, messageID, *arguments, *reply);383 pageProxy->didReceiveSyncMessage(connection, messageID, arguments, reply); 384 384 } 385 385 -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
r64396 r64877 61 61 } 62 62 63 void encode(CoreIPC::ArgumentEncoder &encoder) const63 void encode(CoreIPC::ArgumentEncoder* encoder) const 64 64 { 65 65 APIObject::Type type = m_root->type(); 66 encoder .encode(static_cast<uint32_t>(type));66 encoder->encode(static_cast<uint32_t>(type)); 67 67 switch (type) { 68 68 case APIObject::TypeArray: { 69 69 ImmutableArray* array = static_cast<ImmutableArray*>(m_root); 70 encoder .encode(static_cast<uint64_t>(array->size()));70 encoder->encode(static_cast<uint64_t>(array->size())); 71 71 for (size_t i = 0; i < array->size(); ++i) 72 encoder .encode(PostMessageEncoder(array->at(i)));72 encoder->encode(PostMessageEncoder(array->at(i))); 73 73 break; 74 74 } 75 75 case APIObject::TypeString: { 76 76 WebString* string = static_cast<WebString*>(m_root); 77 encoder .encode(string->string());77 encoder->encode(string->string()); 78 78 break; 79 79 } 80 80 case APIObject::TypeBundlePage: { 81 81 WebPage* page = static_cast<WebPage*>(m_root); 82 encoder .encode(page->pageID());82 encoder->encode(page->pageID()); 83 83 break; 84 84 } … … 107 107 } 108 108 109 static bool decode(CoreIPC::ArgumentDecoder &decoder, PostMessageDecoder& coder)109 static bool decode(CoreIPC::ArgumentDecoder* decoder, PostMessageDecoder& coder) 110 110 { 111 111 uint32_t type; 112 if (!decoder .decode(type))112 if (!decoder->decode(type)) 113 113 return false; 114 114 … … 116 116 case APIObject::TypeArray: { 117 117 uint64_t size; 118 if (!decoder .decode(size))118 if (!decoder->decode(size)) 119 119 return false; 120 120 … … 125 125 APIObject* element; 126 126 PostMessageDecoder messageCoder(&element); 127 if (!decoder .decode(messageCoder))127 if (!decoder->decode(messageCoder)) 128 128 return false; 129 129 array[i] = element; … … 135 135 case APIObject::TypeString: { 136 136 String string; 137 if (!decoder .decode(string))137 if (!decoder->decode(string)) 138 138 return false; 139 139 *(coder.m_root) = WebString::create(string).leakRef(); … … 142 142 case APIObject::TypePage: { 143 143 uint64_t pageID; 144 if (!decoder .decode(pageID))144 if (!decoder->decode(pageID)) 145 145 return false; 146 146 *(coder.m_root) = WebProcess::shared().webPage(pageID); … … 212 212 } 213 213 214 void InjectedBundle::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)214 void InjectedBundle::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 215 215 { 216 216 switch (messageID.get<InjectedBundleMessage::Kind>()) { … … 220 220 APIObject* messageBody = 0; 221 221 PostMessageDecoder messageCoder(&messageBody); 222 if (!arguments .decode(CoreIPC::Out(messageName, messageCoder)))222 if (!arguments->decode(CoreIPC::Out(messageName, messageCoder))) 223 223 return; 224 224 -
trunk/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
r64603 r64877 78 78 void didReceiveMessage(const WebCore::String&, APIObject*); 79 79 80 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);80 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 81 81 82 82 private: -
trunk/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp
r64594 r64877 181 181 } 182 182 183 void ChunkedUpdateDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)183 void ChunkedUpdateDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 184 184 { 185 185 DrawingAreaID targetDrawingAreaID; 186 if (!arguments .decode(CoreIPC::Out(targetDrawingAreaID)))186 if (!arguments->decode(CoreIPC::Out(targetDrawingAreaID))) 187 187 return; 188 188 … … 194 194 case DrawingAreaMessage::SetSize: { 195 195 IntSize size; 196 if (!arguments .decode(CoreIPC::Out(size)))196 if (!arguments->decode(CoreIPC::Out(size))) 197 197 return; 198 198 … … 207 207 case DrawingAreaMessage::ResumePainting: { 208 208 bool forceRepaint; 209 if (!arguments .decode(CoreIPC::Out(forceRepaint)))209 if (!arguments->decode(CoreIPC::Out(forceRepaint))) 210 210 return; 211 211 -
trunk/WebKit2/WebProcess/WebPage/ChunkedUpdateDrawingArea.h
r64594 r64877 55 55 #endif 56 56 57 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);57 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 58 58 59 59 private: -
trunk/WebKit2/WebProcess/WebPage/DrawingArea.h
r64594 r64877 65 65 #endif 66 66 67 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &) = 0;67 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*) = 0; 68 68 69 69 protected: -
trunk/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.cpp
r64594 r64877 147 147 } 148 148 149 void LayerBackedDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)149 void LayerBackedDrawingArea::didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 150 150 { 151 151 DrawingAreaID targetDrawingAreaID; 152 if (!arguments .decode(CoreIPC::Out(targetDrawingAreaID)))152 if (!arguments->decode(CoreIPC::Out(targetDrawingAreaID))) 153 153 return; 154 154 … … 160 160 case DrawingAreaMessage::SetSize: { 161 161 IntSize size; 162 if (!arguments .decode(CoreIPC::Out(size)))162 if (!arguments->decode(CoreIPC::Out(size))) 163 163 return; 164 164 -
trunk/WebKit2/WebProcess/WebPage/LayerBackedDrawingArea.h
r64594 r64877 69 69 virtual void syncCompositingLayers(); 70 70 71 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);71 virtual void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 72 72 73 73 private: -
trunk/WebKit2/WebProcess/WebPage/WebPage.cpp
r64862 r64877 543 543 } 544 544 545 void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder &arguments)545 void WebPage::didReceiveMessage(CoreIPC::Connection* connection, CoreIPC::MessageID messageID, CoreIPC::ArgumentDecoder* arguments) 546 546 { 547 547 if (messageID.is<CoreIPC::MessageClassDrawingArea>()) { … … 554 554 case WebPageMessage::SetActive: { 555 555 bool active; 556 if (!arguments .decode(active))556 if (!arguments->decode(active)) 557 557 return; 558 558 … … 562 562 case WebPageMessage::SetFocused: { 563 563 bool focused; 564 if (!arguments .decode(focused))564 if (!arguments->decode(focused)) 565 565 return; 566 566 … … 570 570 case WebPageMessage::SetIsInWindow: { 571 571 bool isInWindow; 572 if (!arguments .decode(isInWindow))572 if (!arguments->decode(isInWindow)) 573 573 return; 574 574 … … 578 578 case WebPageMessage::MouseEvent: { 579 579 WebMouseEvent event; 580 if (!arguments .decode(event))580 if (!arguments->decode(event)) 581 581 return; 582 582 mouseEvent(event); … … 585 585 case WebPageMessage::PreferencesDidChange: { 586 586 WebPreferencesStore store; 587 if (!arguments .decode(store))587 if (!arguments->decode(store)) 588 588 return; 589 589 … … 593 593 case WebPageMessage::WheelEvent: { 594 594 WebWheelEvent event; 595 if (!arguments .decode(event))595 if (!arguments->decode(event)) 596 596 return; 597 597 … … 601 601 case WebPageMessage::KeyEvent: { 602 602 WebKeyboardEvent event; 603 if (!arguments .decode(event))603 if (!arguments->decode(event)) 604 604 return; 605 605 … … 609 609 case WebPageMessage::LoadURL: { 610 610 String url; 611 if (!arguments .decode(url))611 if (!arguments->decode(url)) 612 612 return; 613 613 … … 620 620 case WebPageMessage::Reload: { 621 621 bool reloadFromOrigin; 622 if (!arguments .decode(CoreIPC::Out(reloadFromOrigin)))622 if (!arguments->decode(CoreIPC::Out(reloadFromOrigin))) 623 623 return; 624 624 … … 628 628 case WebPageMessage::GoForward: { 629 629 uint64_t backForwardItemID; 630 if (!arguments .decode(CoreIPC::Out(backForwardItemID)))630 if (!arguments->decode(CoreIPC::Out(backForwardItemID))) 631 631 return; 632 632 goForward(backForwardItemID); … … 635 635 case WebPageMessage::GoBack: { 636 636 uint64_t backForwardItemID; 637 if (!arguments .decode(CoreIPC::Out(backForwardItemID)))637 if (!arguments->decode(CoreIPC::Out(backForwardItemID))) 638 638 return; 639 639 goBack(backForwardItemID); … … 642 642 case WebPageMessage::GoToBackForwardItem: { 643 643 uint64_t backForwardItemID; 644 if (!arguments .decode(CoreIPC::Out(backForwardItemID)))644 if (!arguments->decode(CoreIPC::Out(backForwardItemID))) 645 645 return; 646 646 goToBackForwardItem(backForwardItemID); … … 651 651 uint64_t listenerID; 652 652 uint32_t policyAction; 653 if (!arguments .decode(CoreIPC::Out(frameID, listenerID, policyAction)))653 if (!arguments->decode(CoreIPC::Out(frameID, listenerID, policyAction))) 654 654 return; 655 655 didReceivePolicyDecision(webFrame(frameID), listenerID, (WebCore::PolicyAction)policyAction); … … 659 659 String script; 660 660 uint64_t callbackID; 661 if (!arguments .decode(CoreIPC::Out(script, callbackID)))661 if (!arguments->decode(CoreIPC::Out(script, callbackID))) 662 662 return; 663 663 runJavaScriptInMainFrame(script, callbackID); … … 666 666 case WebPageMessage::GetRenderTreeExternalRepresentation: { 667 667 uint64_t callbackID; 668 if (!arguments .decode(callbackID))668 if (!arguments->decode(callbackID)) 669 669 return; 670 670 getRenderTreeExternalRepresentation(callbackID); -
trunk/WebKit2/WebProcess/WebPage/WebPage.h
r64862 r64877 94 94 95 95 // -- Called from WebProcess. 96 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder &);96 void didReceiveMessage(CoreIPC::Connection*, CoreIPC::MessageID, CoreIPC::ArgumentDecoder*); 97 97 98 98 // -- InjectedBundle methods -
trunk/WebKit2/WebProcess/WebProcess.cpp
r64871 r64877 295 295 if (!m_injectedBundle) 296 296 return; 297 m_injectedBundle->didReceiveMessage(connection, messageID, *arguments);297 m_injectedBundle->didReceiveMessage(connection, messageID, arguments); 298 298 return; 299 299 } … … 307 307 return; 308 308 309 page->didReceiveMessage(connection, messageID, *arguments);309 page->didReceiveMessage(connection, messageID, arguments); 310 310 } 311 311
Note: See TracChangeset
for help on using the changeset viewer.