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

Unified Diff: src/heap.cc

Issue 53004: Add basic infrastructure for protecting V8's heap when leaving the VM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 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/heap.h ('k') | src/log.cc » ('j') | src/log.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 1577)
+++ src/heap.cc (working copy)
@@ -2861,6 +2861,30 @@
}
+#ifdef ENABLE_HEAP_PROTECTION
+
+void Heap::Protect() {
+ new_space_.Protect();
+ map_space_->Protect();
+ old_pointer_space_->Protect();
+ old_data_space_->Protect();
+ code_space_->Protect();
+ lo_space_->Protect();
+}
+
+
+void Heap::Unprotect() {
+ new_space_.Unprotect();
+ map_space_->Unprotect();
+ old_pointer_space_->Unprotect();
+ old_data_space_->Unprotect();
+ code_space_->Unprotect();
+ lo_space_->Unprotect();
+}
+
+#endif
+
+
#ifdef DEBUG
class PrintHandleVisitor: public ObjectVisitor {
« no previous file with comments | « src/heap.h ('k') | src/log.cc » ('j') | src/log.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698