Title: [129575] trunk/Source/WebKit2
- Revision
- 129575
- Author
- [email protected]
- Date
- 2012-09-25 16:52:33 -0700 (Tue, 25 Sep 2012)
Log Message
Get rid of WebContext::m_pendingMessagesToPostToInjectedBundle
https://bugs.webkit.org/show_bug.cgi?id=94368
Reviewed by Anders Carlsson.
It doesn't appear to be of any use.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::postMessageToInjectedBundle):
* UIProcess/WebContext.h:
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (129574 => 129575)
--- trunk/Source/WebKit2/ChangeLog 2012-09-25 23:42:52 UTC (rev 129574)
+++ trunk/Source/WebKit2/ChangeLog 2012-09-25 23:52:33 UTC (rev 129575)
@@ -1,3 +1,17 @@
+2012-09-25 Alexey Proskuryakov <[email protected]>
+
+ Get rid of WebContext::m_pendingMessagesToPostToInjectedBundle
+ https://bugs.webkit.org/show_bug.cgi?id=94368
+
+ Reviewed by Anders Carlsson.
+
+ It doesn't appear to be of any use.
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::createNewWebProcess):
+ (WebKit::WebContext::postMessageToInjectedBundle):
+ * UIProcess/WebContext.h:
+
2012-09-24 Simon Fraser <[email protected]>
<rdar://problem/12351906> Have DumpRenderTree and WebKitTestRunner crash logs show which test crashed
Modified: trunk/Source/WebKit2/UIProcess/WebContext.cpp (129574 => 129575)
--- trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-09-25 23:42:52 UTC (rev 129574)
+++ trunk/Source/WebKit2/UIProcess/WebContext.cpp 2012-09-25 23:52:33 UTC (rev 129575)
@@ -366,13 +366,6 @@
injectedBundleInitializationUserData = m_injectedBundleInitializationUserData;
process->send(Messages::WebProcess::InitializeWebProcess(parameters, WebContextUserMessageEncoder(injectedBundleInitializationUserData.get())), 0);
- for (size_t i = 0; i != m_pendingMessagesToPostToInjectedBundle.size(); ++i) {
- pair<String, RefPtr<APIObject> >& message = m_pendingMessagesToPostToInjectedBundle[i];
- process->deprecatedSend(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(message.first, WebContextUserMessageEncoder(message.second.get())));
- }
- // FIXME (Multi-WebProcess) (94368): What does this mean in the brave new world?
- m_pendingMessagesToPostToInjectedBundle.clear();
-
return process.release();
}
@@ -566,18 +559,14 @@
void WebContext::postMessageToInjectedBundle(const String& messageName, APIObject* messageBody)
{
- if (m_processes.isEmpty()) {
- m_pendingMessagesToPostToInjectedBundle.append(std::make_pair(messageName, messageBody));
+ if (m_processes.isEmpty())
return;
- }
+ // FIXME: Return early if the message body contains any references to WKPageRefs/WKFrameRefs etc. since they're local to a process.
+
for (size_t i = 0; i < m_processes.size(); ++i) {
- // FIXME (Multi-WebProcess): Evolve m_pendingMessagesToPostToInjectedBundle to work with multiple secondary processes.
- if (!m_processes[i]->canSendMessage()) {
- m_pendingMessagesToPostToInjectedBundle.append(std::make_pair(messageName, messageBody));
- continue;
- }
// FIXME: We should consider returning false from this function if the messageBody cannot be encoded.
+ // FIXME: Can we encode the message body outside the loop for all the processes?
m_processes[i]->deprecatedSend(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(messageName, WebContextUserMessageEncoder(messageBody)));
}
}
Modified: trunk/Source/WebKit2/UIProcess/WebContext.h (129574 => 129575)
--- trunk/Source/WebKit2/UIProcess/WebContext.h 2012-09-25 23:42:52 UTC (rev 129574)
+++ trunk/Source/WebKit2/UIProcess/WebContext.h 2012-09-25 23:52:33 UTC (rev 129575)
@@ -307,8 +307,6 @@
bool m_alwaysUsesComplexTextCodePath;
bool m_shouldUseFontSmoothing;
- Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle;
-
CacheModel m_cacheModel;
WebDownloadClient m_downloadClient;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes