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

Unified Diff: src/heap.h

Issue 14625003: expose AssertNoAllocation to api (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: state is now bool 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') | no next file with comments »
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..b25aa7f612b645a8453f380025a258d5e927a88b 100644
--- a/src/heap.h
+++ b/src/heap.h
@@ -1476,6 +1476,7 @@ class Heap {
#ifdef DEBUG
bool IsAllocationAllowed() { return allocation_allowed_; }
+ inline void set_allow_allocation(bool allocation_allowed);
inline bool allow_allocation(bool enable);
bool disallow_allocation_failure() {
@@ -2691,6 +2692,13 @@ class DescriptorLookupCache {
// { AssertNoAllocation nogc;
// ...
// }
+
+#ifdef DEBUG
+inline bool EnterAllocationScope(Isolate* isolate, bool allow_allocation);
+inline void ExitAllocationScope(Isolate* isolate, bool last_state);
+#endif
+
+
class AssertNoAllocation {
public:
inline AssertNoAllocation();
@@ -2698,8 +2706,7 @@ class AssertNoAllocation {
#ifdef DEBUG
private:
- bool old_state_;
- bool active_;
+ bool last_state_;
#endif
};
@@ -2711,8 +2718,7 @@ class DisableAssertNoAllocation {
#ifdef DEBUG
private:
- bool old_state_;
- bool active_;
+ bool last_state_;
#endif
};
« no previous file with comments | « src/api.cc ('k') | src/heap-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698