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

Unified Diff: src/api.h

Issue 8536042: Extension state made per-siolate in genesis (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.h
diff --git a/src/api.h b/src/api.h
index f41c96ede8bf9e15dc0814a72d0b9551e0afbb73..b0d32b3cf12696e1668b1b60a747436001498eb7 100644
--- a/src/api.h
+++ b/src/api.h
@@ -30,6 +30,7 @@
#include "apiutils.h"
#include "factory.h"
+#include "hashmap.h"
#include "../include/v8-testing.h"
@@ -137,10 +138,6 @@ class ApiFunction {
};
-enum ExtensionTraversalState {
- UNVISITED, VISITED, INSTALLED
-};
-
class RegisteredExtension {
public:
@@ -149,18 +146,30 @@ class RegisteredExtension {
Extension* extension() { return extension_; }
RegisteredExtension* next() { return next_; }
RegisteredExtension* next_auto() { return next_auto_; }
- ExtensionTraversalState state() { return state_; }
- void set_state(ExtensionTraversalState value) { state_ = value; }
static RegisteredExtension* first_extension() { return first_extension_; }
private:
Extension* extension_;
RegisteredExtension* next_;
RegisteredExtension* next_auto_;
- ExtensionTraversalState state_;
static RegisteredExtension* first_extension_;
};
+namespace internal {
+enum ExtensionTraversalState {
+ UNVISITED, VISITED, INSTALLED
+};
+
+
+class ExtensionStates : private HashMap {
Vitaly Repeshko 2011/11/15 18:14:17 Use delegation instead of implementation inheritan
+ public:
+ ExtensionStates();
+ ExtensionTraversalState get_state(RegisteredExtension* extension);
+ void set_state(RegisteredExtension* extension, ExtensionTraversalState state);
+};
+}
Vitaly Repeshko 2011/11/15 18:14:17 nit: // namespace internal
+
+
class Utils {
public:
static bool ReportApiFailure(const char* location, const char* message);
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/api.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698