Index: android_webview/native/aw_contents.cc |
diff --git a/android_webview/native/aw_contents.cc b/android_webview/native/aw_contents.cc |
index 858047820c966a20833a69fe0c0db2e6879a8c5a..e192656d658e84743dd6e7be94758c48056b79c3 100644 |
--- a/android_webview/native/aw_contents.cc |
+++ b/android_webview/native/aw_contents.cc |
@@ -60,6 +60,7 @@ |
#include "content/public/browser/render_process_host.h" |
#include "content/public/browser/render_view_host.h" |
#include "content/public/browser/web_contents.h" |
+#include "content/public/common/message_port_types.h" |
#include "content/public/common/renderer_preferences.h" |
#include "content/public/common/ssl_status.h" |
#include "jni/AwContents_jni.h" |
@@ -1113,11 +1114,14 @@ void AwContents::PostMessageToFrame(JNIEnv* env, jobject obj, |
base::Unretained(AwMessagePortServiceImpl::GetInstance()), |
j_ports)); |
} |
+ std::vector<content::TransferredMessagePort> ports(j_ports.size()); |
+ for (size_t i = 0; i < j_ports.size(); ++i) |
+ ports[i].id = j_ports[i]; |
content::MessagePortProvider::PostMessageToFrame(web_contents_.get(), |
source_origin, |
j_target_origin, |
j_message, |
- j_ports); |
+ ports); |
} |
scoped_refptr<AwMessagePortMessageFilter> |