From 163beed3b15b1497b3014cdd491ecb89e375ed66 Mon Sep 17 00:00:00 2001 From: "rdevlin.cronin" Date: Fri, 4 Mar 2016 10:19:09 -0800 Subject: [Extensions] Use more private properties in our bindings BUG=591164 Review URL: https://codereview.chromium.org/1756993002 Cr-Commit-Position: refs/heads/master@{#379315} --- extensions/renderer/module_system.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'extensions/renderer') diff --git a/extensions/renderer/module_system.cc b/extensions/renderer/module_system.cc index f027413..4ca689a 100644 --- a/extensions/renderer/module_system.cc +++ b/extensions/renderer/module_system.cc @@ -399,7 +399,7 @@ void ModuleSystem::LazyFieldGetterInner( v8::Local::Cast(module_system_value)->Value()); v8::Local v8_module_name; - if (!GetProperty(context, parameters, kModuleName, &v8_module_name)) { + if (!GetPrivateProperty(context, parameters, kModuleName, &v8_module_name)) { Warn(isolate, "Cannot find module."); return; } @@ -419,7 +419,7 @@ void ModuleSystem::LazyFieldGetterInner( v8::Local module = v8::Local::Cast(module_value); v8::Local field_value; - if (!GetProperty(context, parameters, kModuleField, &field_value)) { + if (!GetPrivateProperty(context, parameters, kModuleField, &field_value)) { module_system->HandleException(try_catch); return; } @@ -479,9 +479,9 @@ void ModuleSystem::SetLazyField(v8::Local object, v8::HandleScope handle_scope(GetIsolate()); v8::Local parameters = v8::Object::New(GetIsolate()); v8::Local context = context_->v8_context(); - SetProperty(context, parameters, kModuleName, + SetPrivateProperty(context, parameters, kModuleName, ToV8StringUnsafe(GetIsolate(), module_name.c_str())); - SetProperty(context, parameters, kModuleField, + SetPrivateProperty(context, parameters, kModuleField, ToV8StringUnsafe(GetIsolate(), module_field.c_str())); auto maybe = object->SetAccessor( context, ToV8StringUnsafe(GetIsolate(), field.c_str()), getter, NULL, -- cgit v1.1