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

Unified Diff: src/heap.cc

Issue 56060: Add just enough state changes from EXTERNAL (outside V8) to OTHER... (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
« src/global-handles.cc ('K') | « src/handles.cc ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.cc
===================================================================
--- src/heap.cc (revision 1641)
+++ src/heap.cc (working copy)
@@ -2864,22 +2864,26 @@
#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();
+ if (HasBeenSetup()) {
+ 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();
+ if (HasBeenSetup()) {
+ new_space_.Unprotect();
+ map_space_->Unprotect();
+ old_pointer_space_->Unprotect();
+ old_data_space_->Unprotect();
+ code_space_->Unprotect();
+ lo_space_->Unprotect();
+ }
}
#endif
« src/global-handles.cc ('K') | « src/handles.cc ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698