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

Side by Side 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: More CR feedback 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 130
131 class ApiFunction { 131 class ApiFunction {
132 public: 132 public:
133 explicit ApiFunction(v8::internal::Address addr) : addr_(addr) { } 133 explicit ApiFunction(v8::internal::Address addr) : addr_(addr) { }
134 v8::internal::Address address() { return addr_; } 134 v8::internal::Address address() { return addr_; }
135 private: 135 private:
136 v8::internal::Address addr_; 136 v8::internal::Address addr_;
137 }; 137 };
138 138
139 139
140 enum ExtensionTraversalState {
141 UNVISITED, VISITED, INSTALLED
142 };
143
144 140
145 class RegisteredExtension { 141 class RegisteredExtension {
146 public: 142 public:
147 explicit RegisteredExtension(Extension* extension); 143 explicit RegisteredExtension(Extension* extension);
148 static void Register(RegisteredExtension* that); 144 static void Register(RegisteredExtension* that);
149 Extension* extension() { return extension_; } 145 Extension* extension() { return extension_; }
150 RegisteredExtension* next() { return next_; } 146 RegisteredExtension* next() { return next_; }
151 RegisteredExtension* next_auto() { return next_auto_; } 147 RegisteredExtension* next_auto() { return next_auto_; }
152 ExtensionTraversalState state() { return state_; }
153 void set_state(ExtensionTraversalState value) { state_ = value; }
154 static RegisteredExtension* first_extension() { return first_extension_; } 148 static RegisteredExtension* first_extension() { return first_extension_; }
155 private: 149 private:
156 Extension* extension_; 150 Extension* extension_;
157 RegisteredExtension* next_; 151 RegisteredExtension* next_;
158 RegisteredExtension* next_auto_; 152 RegisteredExtension* next_auto_;
159 ExtensionTraversalState state_;
160 static RegisteredExtension* first_extension_; 153 static RegisteredExtension* first_extension_;
161 }; 154 };
162 155
163 156
164 class Utils { 157 class Utils {
165 public: 158 public:
166 static bool ReportApiFailure(const char* location, const char* message); 159 static bool ReportApiFailure(const char* location, const char* message);
167 160
168 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj); 161 static Local<FunctionTemplate> ToFunctionTemplate(NeanderObject obj);
169 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj); 162 static Local<ObjectTemplate> ToObjectTemplate(NeanderObject obj);
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 stress_type_ = stress_type; 555 stress_type_ = stress_type;
563 } 556 }
564 557
565 private: 558 private:
566 static v8::Testing::StressType stress_type_; 559 static v8::Testing::StressType stress_type_;
567 }; 560 };
568 561
569 } } // namespace v8::internal 562 } } // namespace v8::internal
570 563
571 #endif // V8_API_H_ 564 #endif // V8_API_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698