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

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

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
« no previous file with comments | « chrome/renderer/extensions/tts_custom_bindings.cc ('k') | chrome/renderer/extensions/v8_schema_registry.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/v8_schema_registry.h
diff --git a/chrome/renderer/extensions/v8_schema_registry.h b/chrome/renderer/extensions/v8_schema_registry.h
index ab3ecf0917a8282e26ecb1b1a722d598ae483b3d..4d4b8e1cd7f0d0b7135ad48197bb105e6720a925 100644
--- a/chrome/renderer/extensions/v8_schema_registry.h
+++ b/chrome/renderer/extensions/v8_schema_registry.h
@@ -10,6 +10,7 @@
#include <string>
#include "base/basictypes.h"
+#include "chrome/renderer/extensions/scoped_persistent.h"
#include "v8/include/v8.h"
namespace extensions {
@@ -24,16 +25,16 @@ class V8SchemaRegistry {
// Returns a v8::Array with all the schemas for the APIs in |apis|.
v8::Handle<v8::Array> GetSchemas(const std::set<std::string>& apis);
- private:
// Returns a v8::Object for the schema for |api|, possibly from the cache.
v8::Handle<v8::Object> GetSchema(const std::string& api);
+ private:
// Cache of schemas.
typedef std::map<std::string, v8::Persistent<v8::Object> > SchemaCache;
SchemaCache schema_cache_;
// Single per-instance v8::Context to create v8::Values.
- v8::Persistent<v8::Context> context_;
+ ScopedPersistent<v8::Context> context_;
DISALLOW_COPY_AND_ASSIGN(V8SchemaRegistry);
};
« no previous file with comments | « chrome/renderer/extensions/tts_custom_bindings.cc ('k') | chrome/renderer/extensions/v8_schema_registry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698