[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
jberlin at webkit.org
jberlin at webkit.org
Wed Dec 22 13:27:27 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 781b04f4451157f25c07b79e75cfda44398e80fa
Author: jberlin at webkit.org <jberlin at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Sep 16 01:50:37 2010 +0000
2010-09-15 Jessie Berlin <jberlin at apple.com>
Reviewed by Jon Honeycutt.
We should save messages that can't be sent when postMessageToInjectedBundle is called and
send them in ensureWebProcess.
https://bugs.webkit.org/show_bug.cgi?id=45822
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureWebProcess):
Post any messages to the Injected Bundle that couldn't be sent earlier because the
WebProcess hadn't been initialized yet.
(WebKit::WebContext::postMessageToInjectedBundle):
* UIProcess/WebContext.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 2d33a4a..9f7523c 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,18 @@
+2010-09-15 Jessie Berlin <jberlin at apple.com>
+
+ Reviewed by Jon Honeycutt.
+
+ We should save messages that can't be sent when postMessageToInjectedBundle is called and
+ send them in ensureWebProcess.
+ https://bugs.webkit.org/show_bug.cgi?id=45822
+
+ * UIProcess/WebContext.cpp:
+ (WebKit::WebContext::ensureWebProcess):
+ Post any messages to the Injected Bundle that couldn't be sent earlier because the
+ WebProcess hadn't been initialized yet.
+ (WebKit::WebContext::postMessageToInjectedBundle):
+ * UIProcess/WebContext.h:
+
2010-09-15 Simon Fraser <simon.fraser at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit2/UIProcess/WebContext.cpp b/WebKit2/UIProcess/WebContext.cpp
index abbe72a..6e014c8 100644
--- a/WebKit2/UIProcess/WebContext.cpp
+++ b/WebKit2/UIProcess/WebContext.cpp
@@ -130,6 +130,12 @@ void WebContext::ensureWebProcess()
for (HashSet<String>::iterator it = m_schemesToRegisterAsEmptyDocument.begin(), end = m_schemesToRegisterAsEmptyDocument.end(); it != end; ++it)
m_process->send(WebProcessMessage::RegisterURLSchemeAsEmptyDocument, 0, CoreIPC::In(*it));
+ for (size_t i = 0; i != m_pendingMessagesToPostToInjectedBundle.size(); ++i) {
+ pair<String, RefPtr<APIObject> >* message = &m_pendingMessagesToPostToInjectedBundle[i];
+ m_process->send(InjectedBundleMessage::PostMessage, 0, CoreIPC::In(message->first, WebContextUserMessageEncoder(message->second.get())));
+ }
+ m_pendingMessagesToPostToInjectedBundle.clear();
+
platformSetUpWebProcess();
}
@@ -197,8 +203,10 @@ void WebContext::preferencesDidChange()
void WebContext::postMessageToInjectedBundle(const String& messageName, APIObject* messageBody)
{
- if (!hasValidProcess())
+ if (!hasValidProcess()) {
+ m_pendingMessagesToPostToInjectedBundle.append(make_pair(messageName, messageBody));
return;
+ }
// FIXME: We should consider returning false from this function if the messageBody cannot
// be encoded.
diff --git a/WebKit2/UIProcess/WebContext.h b/WebKit2/UIProcess/WebContext.h
index ff08c12..e7d24d1 100644
--- a/WebKit2/UIProcess/WebContext.h
+++ b/WebKit2/UIProcess/WebContext.h
@@ -136,6 +136,7 @@ private:
VisitedLinkProvider m_visitedLinkProvider;
HashSet<WTF::String> m_schemesToRegisterAsEmptyDocument;
+ Vector<pair<String, RefPtr<APIObject> > > m_pendingMessagesToPostToInjectedBundle;
#if PLATFORM(WIN)
bool m_shouldPaintNativeControls;
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list