Changeset 70702 in webkit
- Timestamp:
- Oct 27, 2010 1:38:36 PM (14 years ago)
- Location:
- trunk/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKit2/ChangeLog
r70696 r70702 1 2010-10-27 Jessie Berlin <jberlin@apple.com> 2 3 Reviewed by Sam Weinig. 4 5 Fix the WebKit2 API tests. 6 https://bugs.webkit.org/show_bug.cgi?id=48461 7 8 The API tests were failing because the tests expect to be able to send messages before the 9 WebProcess finishes launching. 10 11 Instead of dispatching the pending messages in processDidFinishLaunching, dispatch them in 12 ensureWebProcess but do not make messages pending if the process is launching. 13 14 * UIProcess/WebContext.cpp: 15 (WebKit::WebContext::processDidFinishLaunching): 16 Move dispatching the pending messages back from here ... 17 (WebKit::WebContext::ensureWebProcess): 18 ... to here. 19 (WebKit::WebContext::postMessageToInjectedBundle): 20 Check whether the process can send messages in order to determine if a message needs to be 21 sent later. 22 23 * UIProcess/WebProcessProxy.h: 24 (WebKit::WebProcessProxy::canSendMessage): 25 The WebProcessProxy can send a message if it is valid or if it is launching. 26 1 27 2010-10-27 Anders Carlsson <andersca@apple.com> 2 28 -
trunk/WebKit2/UIProcess/WebContext.cpp
r70585 r70702 179 179 180 180 m_process->send(Messages::WebProcess::InitializeWebProcess(parameters), 0); 181 }182 183 void WebContext::processDidFinishLaunching(WebProcessProxy* process)184 {185 // FIXME: Once we support multiple processes per context, this assertion won't hold.186 ASSERT(process == m_process);187 188 m_visitedLinkProvider.populateVisitedLinksIfNeeded();189 181 190 182 for (size_t i = 0; i != m_pendingMessagesToPostToInjectedBundle.size(); ++i) { … … 195 187 } 196 188 189 void WebContext::processDidFinishLaunching(WebProcessProxy* process) 190 { 191 // FIXME: Once we support multiple processes per context, this assertion won't hold. 192 ASSERT(process == m_process); 193 194 m_visitedLinkProvider.populateVisitedLinksIfNeeded(); 195 } 196 197 197 void WebContext::processDidClose(WebProcessProxy* process) 198 198 { … … 261 261 void WebContext::postMessageToInjectedBundle(const String& messageName, APIObject* messageBody) 262 262 { 263 if (! hasValidProcess()) {263 if (!m_process || !m_process->canSendMessage()) { 264 264 m_pendingMessagesToPostToInjectedBundle.append(make_pair(messageName, messageBody)); 265 265 return; -
trunk/WebKit2/UIProcess/WebProcessProxy.h
r69037 r70702 91 91 bool isValid() const { return m_connection; } 92 92 bool isLaunching() const; 93 bool canSendMessage() const { return isValid() || isLaunching(); } 93 94 94 95 WebFrameProxy* webFrame(uint64_t) const;
Note: See TracChangeset
for help on using the changeset viewer.