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

Unified Diff: content/child/webmessageportchannel_impl.cc

Issue 2537953003: WebString: makes string16 conversions explicit (part 1: blink, content) (Closed)
Patch Set: fix Created 4 years 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 | « content/child/webfileutilities_impl.cc ('k') | content/public/common/color_suggestion.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « content/child/webfileutilities_impl.cc ('k') | content/public/common/color_suggestion.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698