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

Unified Diff: chrome/renderer/extensions/i18n_custom_bindings.cc

Issue 107083006: More v8-API-related cleanup. (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
« no previous file with comments | « chrome/renderer/extensions/event_bindings.cc ('k') | chrome/renderer/extensions/messaging_bindings.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/i18n_custom_bindings.cc
diff --git a/chrome/renderer/extensions/i18n_custom_bindings.cc b/chrome/renderer/extensions/i18n_custom_bindings.cc
index 10946bb0dd7cb76220ef2f32c5c9f276d0a282fc..627b371ce6c49dd84a5a3d2f17f481ee26ce3540 100644
--- a/chrome/renderer/extensions/i18n_custom_bindings.cc
+++ b/chrome/renderer/extensions/i18n_custom_bindings.cc
@@ -61,6 +61,7 @@ void I18NCustomBindings::GetL10nMessage(
std::string message =
MessageBundle::GetL10nMessage(message_name, *l10n_messages);
+ v8::Isolate* isolate = args.GetIsolate();
std::vector<std::string> substitutions;
if (args[1]->IsArray()) {
// chrome.i18n.getMessage("message_name", ["more", "params"]);
@@ -71,7 +72,7 @@ void I18NCustomBindings::GetL10nMessage(
for (uint32_t i = 0; i < count; ++i) {
substitutions.push_back(
*v8::String::Utf8Value(
- placeholders->Get(v8::Integer::New(i))->ToString()));
+ placeholders->Get(v8::Integer::New(isolate, i))->ToString()));
}
} else if (args[1]->IsString()) {
// chrome.i18n.getMessage("message_name", "one param");
@@ -79,7 +80,7 @@ void I18NCustomBindings::GetL10nMessage(
}
args.GetReturnValue().Set(
- v8::String::NewFromUtf8(args.GetIsolate(), ReplaceStringPlaceholders(
+ v8::String::NewFromUtf8(isolate, ReplaceStringPlaceholders(
message, substitutions, NULL).c_str()));
}
« no previous file with comments | « chrome/renderer/extensions/event_bindings.cc ('k') | chrome/renderer/extensions/messaging_bindings.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698