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

Unified Diff: src/log.cc

Issue 55007: Mark some of the places we leave V8 via callbacks as transitions to... (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/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
===================================================================
--- src/log.cc (revision 1629)
+++ src/log.cc (working copy)
@@ -1125,11 +1125,11 @@
if (FLAG_protect_heap && previous_ != NULL) {
if (state_ == EXTERNAL) {
// We are leaving V8.
- ASSERT(previous_ == NULL || previous_->state_ != EXTERNAL);
+ ASSERT(previous_->state_ != EXTERNAL);
Heap::Protect();
- } else {
- // Are we entering V8?
- if (previous_->state_ == EXTERNAL) Heap::Unprotect();
+ } else if (previous_->state_ == EXTERNAL) {
+ // We are entering V8.
+ Heap::Unprotect();
}
}
#endif
@@ -1149,11 +1149,12 @@
#ifdef ENABLE_HEAP_PROTECTION
if (FLAG_protect_heap && previous_ != NULL) {
if (state_ == EXTERNAL) {
- // Are we (re)entering V8?
- if (previous_->state_ != EXTERNAL) Heap::Unprotect();
- } else {
- // Are we leaving V8?
- if (previous_->state_ == EXTERNAL) Heap::Protect();
+ // We are reentering V8.
+ ASSERT(previous_->state_ != EXTERNAL);
+ Heap::Unprotect();
+ } else if (previous_->state_ == EXTERNAL) {
+ // We are leaving V8.
+ Heap::Protect();
}
}
#endif
« no previous file with comments | « src/handles.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698