diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-26 10:42:44 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2012-09-26 10:42:44 +0200 |
commit | 33b26980cb24288b5a9f2590ccf32a949281bb79 (patch) | |
tree | cc0203dac37338b24b0b25a4694c0b76d4e4164b /Source/WebKit2/UIProcess/WebContext.cpp | |
parent | 715be629d51174233403237bfc563cf150087dc8 (diff) | |
download | qtwebkit-33b26980cb24288b5a9f2590ccf32a949281bb79.tar.gz |
Imported WebKit commit c596dd7f03007fa7ed896b928106497e8784b3b5 (http://svn.webkit.org/repository/webkit/trunk@129610)
New snapshot that removes QtQuick1 support (to be moved into QtQuick1 module)
Diffstat (limited to 'Source/WebKit2/UIProcess/WebContext.cpp')
-rw-r--r-- | Source/WebKit2/UIProcess/WebContext.cpp | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp index fbdc6b3fa..f0c3580c1 100644 --- a/Source/WebKit2/UIProcess/WebContext.cpp +++ b/Source/WebKit2/UIProcess/WebContext.cpp @@ -366,13 +366,6 @@ PassRefPtr<WebProcessProxy> WebContext::createNewWebProcess() 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 @@ DownloadProxy* WebContext::download(WebPageProxy* initiatingPage, const Resource 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))); } } |