Changeset 86101 in webkit
- Timestamp:
- May 9, 2011 4:08:15 PM (13 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r86097 r86101 1 2011-05-09 Anders Carlsson <andersca@apple.com> 2 3 Reviewed by Dan Bernstein. 4 5 Crash when sending a sync message to a crashed web process 6 https://bugs.webkit.org/show_bug.cgi?id=60514 7 <rdar://problem/9281270> 8 9 Change WebProcessProxy::sendSync to return false if there's no connection. 10 11 Audit all WebProcessProxy::sendSync call sites to initialize reply parameters. 12 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::firstRectForCharacterInSelectedRange): 15 (WebKit::WebPageProxy::getSelectedText): 16 (WebKit::WebPageProxy::gestureWillBegin): 17 * UIProcess/WebProcessProxy.h: 18 (WebKit::WebProcessProxy::sendSync): 19 * UIProcess/mac/WebPageProxyMac.mm: 20 (WebKit::WebPageProxy::insertText): 21 (WebKit::WebPageProxy::getMarkedRange): 22 (WebKit::WebPageProxy::getSelectedRange): 23 (WebKit::WebPageProxy::characterIndexForPoint): 24 (WebKit::WebPageProxy::executeKeypressCommands): 25 (WebKit::WebPageProxy::writeSelectionToPasteboard): 26 (WebKit::WebPageProxy::readSelectionFromPasteboard): 27 1 28 2011-05-09 Anders Carlsson <andersca@apple.com> 2 29 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r85983 r86101 684 684 IntRect WebPageProxy::firstRectForCharacterInSelectedRange(int characterPosition) 685 685 { 686 if (!isValid())687 return IntRect();688 689 686 IntRect resultRect; 690 687 process()->sendSync(Messages::WebPage::FirstRectForCharacterInSelectedRange(characterPosition), Messages::WebPage::FirstRectForCharacterInSelectedRange::Reply(resultRect), m_pageID); … … 694 691 String WebPageProxy::getSelectedText() 695 692 { 696 if (!isValid())697 return String();698 699 693 String text; 700 694 process()->sendSync(Messages::WebPage::GetSelectedText(), Messages::WebPage::GetSelectedText::Reply(text), m_pageID); … … 704 698 bool WebPageProxy::gestureWillBegin(const IntPoint& point) 705 699 { 706 if (!isValid())707 return false;708 709 700 bool canBeginPanning = false; 710 701 process()->sendSync(Messages::WebPage::GestureWillBegin(point), Messages::WebPage::GestureWillBegin::Reply(canBeginPanning), m_pageID); -
trunk/Source/WebKit2/UIProcess/WebProcessProxy.h
r84302 r86101 188 188 bool WebProcessProxy::sendSync(const U& message, const typename U::Reply& reply, uint64_t destinationID, double timeout) 189 189 { 190 if (!m_connection) 191 return false; 192 190 193 return m_connection->sendSync(message, reply, destinationID, timeout); 191 194 } -
trunk/Source/WebKit2/UIProcess/mac/WebPageProxyMac.mm
r85252 r86101 174 174 return true; 175 175 176 bool handled ;176 bool handled = true; 177 177 process()->sendSync(Messages::WebPage::InsertText(text, replacementRangeStart, replacementRangeEnd), Messages::WebPage::InsertText::Reply(handled, m_editorState), m_pageID); 178 178 return handled; … … 181 181 void WebPageProxy::getMarkedRange(uint64_t& location, uint64_t& length) 182 182 { 183 if (!isValid()) { 184 location = NSNotFound; 185 length = 0; 186 return; 187 } 183 location = NSNotFound; 184 length = 0; 185 186 if (!isValid()) 187 return; 188 188 189 process()->sendSync(Messages::WebPage::GetMarkedRange(), Messages::WebPage::GetMarkedRange::Reply(location, length), m_pageID); 189 190 } … … 191 192 void WebPageProxy::getSelectedRange(uint64_t& location, uint64_t& length) 192 193 { 193 if (!isValid()) { 194 location = NSNotFound; 195 length = 0; 196 return; 197 } 194 location = NSNotFound; 195 length = 0; 196 197 if (!isValid()) 198 return; 199 198 200 process()->sendSync(Messages::WebPage::GetSelectedRange(), Messages::WebPage::GetSelectedRange::Reply(location, length), m_pageID); 199 201 } … … 211 213 return 0; 212 214 213 uint64_t result ;215 uint64_t result = 0; 214 216 process()->sendSync(Messages::WebPage::CharacterIndexForPoint(point), Messages::WebPage::CharacterIndexForPoint::Reply(result), m_pageID); 215 217 return result; … … 231 233 return false; 232 234 233 bool result ;235 bool result = false; 234 236 process()->sendSync(Messages::WebPage::ExecuteKeypressCommands(commands), Messages::WebPage::ExecuteKeypressCommands::Reply(result, m_editorState), m_pageID); 235 237 return result; … … 241 243 return false; 242 244 243 bool result ;245 bool result = false; 244 246 const double messageTimeout = 20; 245 247 process()->sendSync(Messages::WebPage::WriteSelectionToPasteboard(pasteboardName, pasteboardTypes), Messages::WebPage::WriteSelectionToPasteboard::Reply(result), m_pageID, messageTimeout); … … 252 254 return false; 253 255 254 bool result ;256 bool result = false; 255 257 const double messageTimeout = 20; 256 258 process()->sendSync(Messages::WebPage::ReadSelectionFromPasteboard(pasteboardName), Messages::WebPage::ReadSelectionFromPasteboard::Reply(result), m_pageID, messageTimeout);
Note: See TracChangeset
for help on using the changeset viewer.