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

Unified Diff: components/plugins/renderer/plugin_placeholder.cc

Issue 100823007: Stop doing unnecessary UTF-8 to UTF-16 conversions in JSONWriter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: '' Created 7 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
Index: components/plugins/renderer/plugin_placeholder.cc
diff --git a/components/plugins/renderer/plugin_placeholder.cc b/components/plugins/renderer/plugin_placeholder.cc
index b4b725b28a044ca40ad9ff3d0a4638f120b26993..a1639640a30b1f4b504d610c273b0955faebcfda 100644
--- a/components/plugins/renderer/plugin_placeholder.cc
+++ b/components/plugins/renderer/plugin_placeholder.cc
@@ -165,7 +165,7 @@ void PluginPlaceholder::SetMessage(const string16& message) {
void PluginPlaceholder::UpdateMessage() {
std::string script =
- "window.setMessage(" + base::GetDoubleQuotedJson(message_) + ")";
+ "window.setMessage(" + base::GetQuotedJSONString(message_) + ")";
plugin_->web_view()->mainFrame()->executeScript(
WebScriptSource(ASCIIToUTF16(script)));
}

Powered by Google App Engine
This is Rietveld 408576698