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

Unified Diff: extensions/renderer/module_system.cc

Issue 744723002: remove some calls to to-be-deprecated v8::Value::To* functions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | « extensions/renderer/i18n_custom_bindings.cc ('k') | extensions/renderer/print_native_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/module_system.cc
diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc
index cdf083a7855bd2204802446723da5d76fdf0c446..1e121051e767869bf0689ae4fc8c06276289edec 100644
--- a/extensions/renderer/module_system.cc
+++ b/extensions/renderer/module_system.cc
@@ -102,7 +102,7 @@ std::string ModuleSystem::ExceptionHandler::CreateExceptionString(
std::string resource_name = "<unknown resource>";
if (!message->GetScriptOrigin().ResourceName().IsEmpty()) {
v8::String::Utf8Value resource_name_v8(
- message->GetScriptOrigin().ResourceName()->ToString());
+ message->GetScriptOrigin().ResourceName());
resource_name.assign(*resource_name_v8, resource_name_v8.length());
}
@@ -201,7 +201,7 @@ v8::Handle<v8::Value> ModuleSystem::Require(const std::string& module_name) {
void ModuleSystem::RequireForJs(
const v8::FunctionCallbackInfo<v8::Value>& args) {
- v8::Handle<v8::String> module_name = args[0]->ToString();
+ v8::Handle<v8::String> module_name = args[0]->ToString(args.GetIsolate());
args.GetReturnValue().Set(RequireForJsInner(module_name));
}
@@ -354,10 +354,8 @@ void ModuleSystem::LazyFieldGetterInner(
ModuleSystem* module_system = static_cast<ModuleSystem*>(
v8::Handle<v8::External>::Cast(module_system_value)->Value());
- std::string name =
- *v8::String::Utf8Value(
- parameters->Get(v8::String::NewFromUtf8(info.GetIsolate(),
- kModuleName))->ToString());
+ std::string name = *v8::String::Utf8Value(parameters->Get(
+ v8::String::NewFromUtf8(info.GetIsolate(), kModuleName)));
// Switch to our v8 context because we need functions created while running
// the require()d module to belong to our context, not the current one.
@@ -378,7 +376,7 @@ void ModuleSystem::LazyFieldGetterInner(
v8::Handle<v8::Object> module = v8::Handle<v8::Object>::Cast(module_value);
v8::Handle<v8::String> field =
parameters->Get(v8::String::NewFromUtf8(info.GetIsolate(), kModuleField))
- ->ToString();
+ ->ToString(info.GetIsolate());
if (!module->Has(field)) {
std::string field_str = *v8::String::Utf8Value(field);
@@ -491,7 +489,7 @@ v8::Handle<v8::Value> ModuleSystem::GetSource(const std::string& module_name) {
void ModuleSystem::RequireNative(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK_EQ(1, args.Length());
- std::string native_name = *v8::String::Utf8Value(args[0]->ToString());
+ std::string native_name = *v8::String::Utf8Value(args[0]);
args.GetReturnValue().Set(RequireNativeFromString(native_name));
}
@@ -526,7 +524,7 @@ v8::Handle<v8::Value> ModuleSystem::RequireNativeFromString(
void ModuleSystem::RequireAsync(
const v8::FunctionCallbackInfo<v8::Value>& args) {
CHECK_EQ(1, args.Length());
- std::string module_name = *v8::String::Utf8Value(args[0]->ToString());
+ std::string module_name = *v8::String::Utf8Value(args[0]);
v8::Handle<v8::Promise::Resolver> resolver(
v8::Promise::Resolver::New(GetIsolate()));
args.GetReturnValue().Set(resolver->GetPromise());
« no previous file with comments | « extensions/renderer/i18n_custom_bindings.cc ('k') | extensions/renderer/print_native_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698