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

Unified Diff: src/heap.h

Issue 6788023: Per-isolate v8::Locker and v8::Unlocker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: New tests for IsLocker Created 9 years, 8 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/heap.h
diff --git a/src/heap.h b/src/heap.h
index 7a1bed3560289912a1e7c22b2ad994348cbdffa5..633bc03531ac5c2c582a7ad2c3e263226686b780 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1938,15 +1938,16 @@ class DescriptorLookupCache {
class DisallowAllocationFailure {
public:
- DisallowAllocationFailure() {
- old_state_ = HEAP->disallow_allocation_failure_;
- HEAP->disallow_allocation_failure_ = true;
+ explicit DisallowAllocationFailure(Heap* heap) : heap_(heap) {
Vitaly Repeshko 2011/04/15 00:29:39 Please don't waste time optimizing debug-only faci
+ old_state_ = heap_->disallow_allocation_failure_;
+ heap_->disallow_allocation_failure_ = true;
}
~DisallowAllocationFailure() {
- HEAP->disallow_allocation_failure_ = old_state_;
+ heap_->disallow_allocation_failure_ = old_state_;
}
private:
bool old_state_;
+ Heap* heap_;
};
class AssertNoAllocation {

Powered by Google App Engine
This is Rietveld 408576698