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

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

Issue 11571014: Lazy load chrome.* APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: android compilation Created 7 years, 9 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
Index: chrome/renderer/extensions/v8_schema_registry.cc
diff --git a/chrome/renderer/extensions/v8_schema_registry.cc b/chrome/renderer/extensions/v8_schema_registry.cc
index bf4c77991000c5a4d5d599a792b7d45364705842..3b66eedf591c779fa7c44372fc7d0b24cbd71d04 100644
--- a/chrome/renderer/extensions/v8_schema_registry.cc
+++ b/chrome/renderer/extensions/v8_schema_registry.cc
@@ -21,12 +21,11 @@ V8SchemaRegistry::~V8SchemaRegistry() {
i != schema_cache_.end(); ++i) {
i->second.Dispose(isolate);
}
- context_.Dispose(isolate);
}
v8::Handle<v8::Array> V8SchemaRegistry::GetSchemas(
const std::set<std::string>& apis) {
- v8::Context::Scope context_scope(context_);
+ v8::Context::Scope context_scope(context_.get());
v8::Handle<v8::Array> v8_apis(v8::Array::New(apis.size()));
size_t api_index = 0;
for (std::set<std::string>::const_iterator i = apis.begin(); i != apis.end();
@@ -50,7 +49,7 @@ v8::Handle<v8::Object> V8SchemaRegistry::GetSchema(const std::string& api) {
v8::Persistent<v8::Object>::New(
context_->GetIsolate(),
v8::Handle<v8::Object>::Cast(
- v8_value_converter->ToV8Value(schema, context_)));
+ v8_value_converter->ToV8Value(schema, context_.get())));
CHECK(!v8_schema.IsEmpty());
schema_cache_[api] = v8_schema;
return v8_schema;
« no previous file with comments | « chrome/renderer/extensions/v8_schema_registry.h ('k') | chrome/renderer/extensions/web_request_custom_bindings.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698