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

Unified Diff: extensions/renderer/v8_schema_registry.cc

Issue 1115563002: extensions/renderer: Use v8::Local instead of v8::Handle. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months 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/v8_schema_registry.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/v8_schema_registry.cc
diff --git a/extensions/renderer/v8_schema_registry.cc b/extensions/renderer/v8_schema_registry.cc
index c08ca470e03b2d11d979cd4f39eddd52d7e6a2b9..65b1bed5d404877b611c529d19d837ca34f78eeb 100644
--- a/extensions/renderer/v8_schema_registry.cc
+++ b/extensions/renderer/v8_schema_registry.cc
@@ -61,7 +61,7 @@ scoped_ptr<NativeHandler> V8SchemaRegistry::AsNativeHandler() {
new SchemaRegistryNativeHandler(this, context.Pass()));
}
-v8::Handle<v8::Array> V8SchemaRegistry::GetSchemas(
+v8::Local<v8::Array> V8SchemaRegistry::GetSchemas(
const std::vector<std::string>& apis) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::EscapableHandleScope handle_scope(isolate);
@@ -77,7 +77,7 @@ v8::Handle<v8::Array> V8SchemaRegistry::GetSchemas(
return handle_scope.Escape(v8_apis);
}
-v8::Handle<v8::Object> V8SchemaRegistry::GetSchema(const std::string& api) {
+v8::Local<v8::Object> V8SchemaRegistry::GetSchema(const std::string& api) {
if (schema_cache_ != NULL) {
v8::Local<v8::Object> cached_schema = schema_cache_->Get(api);
if (!cached_schema.IsEmpty()) {
@@ -89,23 +89,23 @@ v8::Handle<v8::Object> V8SchemaRegistry::GetSchema(const std::string& api) {
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::EscapableHandleScope handle_scope(isolate);
- v8::Handle<v8::Context> context = GetOrCreateContext(isolate);
+ v8::Local<v8::Context> context = GetOrCreateContext(isolate);
v8::Context::Scope context_scope(context);
const base::DictionaryValue* schema =
ExtensionAPI::GetSharedInstance()->GetSchema(api);
CHECK(schema) << api;
scoped_ptr<V8ValueConverter> v8_value_converter(V8ValueConverter::create());
- v8::Handle<v8::Value> value = v8_value_converter->ToV8Value(schema, context);
+ v8::Local<v8::Value> value = v8_value_converter->ToV8Value(schema, context);
CHECK(!value.IsEmpty());
- v8::Local<v8::Object> v8_schema(v8::Handle<v8::Object>::Cast(value));
+ v8::Local<v8::Object> v8_schema(v8::Local<v8::Object>::Cast(value));
schema_cache_->Set(api, v8_schema);
return handle_scope.Escape(v8_schema);
}
-v8::Handle<v8::Context> V8SchemaRegistry::GetOrCreateContext(
+v8::Local<v8::Context> V8SchemaRegistry::GetOrCreateContext(
v8::Isolate* isolate) {
// It's ok to create local handles in this function, since this is only called
// when we have a HandleScope.
« no previous file with comments | « extensions/renderer/v8_schema_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698