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

Unified Diff: content/child/webmessageportchannel_impl.cc

Issue 2656043002: Use explicit WebString conversions in remaining content files (Closed)
Patch Set: build fix Created 3 years, 11 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
Index: content/child/webmessageportchannel_impl.cc
diff --git a/content/child/webmessageportchannel_impl.cc b/content/child/webmessageportchannel_impl.cc
index 2b4d265a895c981473ee0968e714490b6d43f3e1..26de409df251f612d9b4d849950dbfbfceaa290a 100644
--- a/content/child/webmessageportchannel_impl.cc
+++ b/content/child/webmessageportchannel_impl.cc
@@ -173,10 +173,10 @@ void WebMessagePortChannelImpl::postMessage(
// from two threads, which is a data race.
main_thread_task_runner_->PostTask(
FROM_HERE, base::Bind(&WebMessagePortChannelImpl::SendPostMessage, this,
- base::Passed(base::string16(message)),
+ base::Passed(message.utf16()),
base::Passed(std::move(channels))));
} else {
- SendPostMessage(message, std::move(channels));
+ SendPostMessage(message.utf16(), std::move(channels));
}
}
@@ -195,7 +195,7 @@ bool WebMessagePortChannelImpl::tryGetMessage(
if (message_queue_.empty())
return false;
- *message = message_queue_.front().message;
+ *message = WebString::fromUTF16(message_queue_.front().message);
channels = message_queue_.front().ports;
message_queue_.pop();
return true;

Powered by Google App Engine
This is Rietveld 408576698