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

Unified Diff: src/api.cc

Issue 9864034: Valgrind cleanliness, part 5: Delete extensions on exit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed extension ownership Created 8 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 | « src/api.h ('k') | src/extensions/externalize-string-extension.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/api.cc
diff --git a/src/api.cc b/src/api.cc
index 1feaf5a20c5af166c7f2c865c1c78e257c702bd2..eab7c8072a3c7cb221d92ab0f1dd52d470084f67 100644
--- a/src/api.cc
+++ b/src/api.cc
@@ -512,6 +512,16 @@ void RegisteredExtension::Register(RegisteredExtension* that) {
}
+void RegisteredExtension::UnregisterAll() {
+ RegisteredExtension* re = first_extension_;
+ while (re != NULL) {
+ RegisteredExtension* next = re->next();
+ delete re;
+ re = next;
+ }
+}
+
+
void RegisterExtension(Extension* that) {
RegisteredExtension* extension = new RegisteredExtension(that);
RegisteredExtension::Register(extension);
« no previous file with comments | « src/api.h ('k') | src/extensions/externalize-string-extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698