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

Unified Diff: src/heap.h

Issue 14625003: expose AssertNoAllocation to api (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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
« no previous file with comments | « src/api.cc ('k') | src/heap-inl.h » ('j') | src/heap-inl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap.h
diff --git a/src/heap.h b/src/heap.h
index 7722079e55049ef94f572b45d1593ec16787f6ae..e97568daf34eb5288edbad1a4de28850e8aabab4 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -2691,6 +2691,15 @@ class DescriptorLookupCache {
// { AssertNoAllocation nogc;
// ...
// }
+
+#ifdef DEBUG
+typedef uint8_t AllocationScopeData;
+inline AllocationScopeData EnterAllocationScope(Isolate* isolate,
+ bool allow_allocation);
+inline void ExitAllocationScope(Isolate* isolate, AllocationScopeData);
+#endif
+
+
class AssertNoAllocation {
public:
inline AssertNoAllocation();
@@ -2698,8 +2707,7 @@ class AssertNoAllocation {
#ifdef DEBUG
private:
- bool old_state_;
- bool active_;
+ AllocationScopeData data_;
#endif
};
@@ -2711,8 +2719,7 @@ class DisableAssertNoAllocation {
#ifdef DEBUG
private:
- bool old_state_;
- bool active_;
+ AllocationScopeData data_;
#endif
};
« no previous file with comments | « src/api.cc ('k') | src/heap-inl.h » ('j') | src/heap-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698