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

Unified Diff: src/zone.h

Issue 115347: Reduce the memory used by frame elements from two words to one by... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 11 years, 7 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
Index: src/zone.h
===================================================================
--- src/zone.h (revision 1947)
+++ src/zone.h (working copy)
@@ -180,10 +180,15 @@
nesting_++;
}
- ~ZoneScope() {
- if (--nesting_ == 0 && mode_ == DELETE_ON_EXIT) Zone::DeleteAll();
+ virtual ~ZoneScope() {
+ if (ShouldDeleteOnExit()) Zone::DeleteAll();
+ --nesting_;
}
+ bool ShouldDeleteOnExit() {
+ return nesting_ == 1 && mode_ == DELETE_ON_EXIT;
+ }
+
// For ZoneScopes that do not delete on exit by default, call this
// method to request deletion on exit.
void DeleteOnExit() {
« src/virtual-frame.h ('K') | « src/virtual-frame.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698