Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Unified Diff: content/browser/android/app_web_message_port.cc

Issue 2755223002: Enable Blink to pass extra Mojo handles across MessagePorts
Patch Set: Finish plumbing Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/child/webmessageportchannel_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/android/app_web_message_port.cc
diff --git a/content/browser/android/app_web_message_port.cc b/content/browser/android/app_web_message_port.cc
index 2e7622cf5416f1b4fe78dfd92eea4eb6868545a9..bc8ddcc376af107ad30f8c64cd0aae89628974a9 100644
--- a/content/browser/android/app_web_message_port.cc
+++ b/content/browser/android/app_web_message_port.cc
@@ -63,7 +63,7 @@ void AppWebMessagePort::PostMessage(
const base::android::JavaParamRef<jobjectArray>& jports) {
port_.PostMessage(
EncodeStringMessage(base::android::ConvertJavaStringToUTF16(jmessage)),
- UnwrapJavaArray(env, jports));
+ UnwrapJavaArray(env, jports), std::vector<mojo::ScopedHandle>());
}
jboolean AppWebMessagePort::DispatchNextMessage(
@@ -79,9 +79,15 @@ jboolean AppWebMessagePort::DispatchNextMessage(
base::string16 encoded_message;
std::vector<MessagePort> ports;
- if (!port_.GetMessage(&encoded_message, &ports))
+ std::vector<mojo::ScopedHandle> handles;
+ if (!port_.GetMessage(&encoded_message, &ports, &handles))
return false;
+ if (!handles.empty()) {
+ DLOG(WARNING) << "Unexpected handles";
+ return false;
+ }
+
base::string16 message;
if (!DecodeStringMessage(encoded_message, &message))
return false;
« no previous file with comments | « no previous file | content/child/webmessageportchannel_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698