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

Unified Diff: src/ast.h

Issue 8586025: Removing exit time destructors by leaking static members. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Macro-fied the elements accessor list. 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/ast.cc » ('j') | src/elements.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast.h
diff --git a/src/ast.h b/src/ast.h
index 71639d5dd2d8a29645b3d26a543c810d0f4efa55..e8e8fb4e5db0565ca54e3ad604d8747d2f903a37 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -2123,9 +2123,10 @@ class RegExpEmpty: public RegExpTree {
virtual bool IsEmpty();
virtual int min_match() { return 0; }
virtual int max_match() { return 0; }
- static RegExpEmpty* GetInstance() { return &kInstance; }
- private:
- static RegExpEmpty kInstance;
+ static RegExpEmpty* GetInstance() {
+ static RegExpEmpty* instance = ::new RegExpEmpty();
+ return instance;
+ }
};
« no previous file with comments | « no previous file | src/ast.cc » ('j') | src/elements.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698