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

Unified Diff: Source/platform/heap/Heap.h

Issue 1237063002: Allocate XMLHttpRequest on the eagerly finalized heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add macro for testing eager finalization Created 5 years, 5 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 | « Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/Heap.h
diff --git a/Source/platform/heap/Heap.h b/Source/platform/heap/Heap.h
index 37d5ce4926273bd6d576eb95f0fef4019b867434..bf207d1fe657d940f9d4ed55865d6784dc2d4eb7 100644
--- a/Source/platform/heap/Heap.h
+++ b/Source/platform/heap/Heap.h
@@ -1179,6 +1179,8 @@ public: \
{ \
return allocateObject(size, true); \
}
+
+#define IS_EAGERLY_FINALIZED() (pageFromObject(this)->heap()->heapIndex() == ThreadState::EagerSweepHeapIndex)
#if ENABLE(ASSERT) && ENABLE(OILPAN)
class VerifyEagerFinalization {
public:
@@ -1192,7 +1194,7 @@ public:
// eagerly finalized. Declaring and defining an 'operator new'
// for this class is what's required -- consider using
// DECLARE_EAGER_FINALIZATION_OPERATOR_NEW().
- ASSERT(pageFromObject(this)->heap()->heapIndex() == ThreadState::EagerSweepHeapIndex);
+ ASSERT(IS_EAGERLY_FINALIZED());
}
};
#define EAGERLY_FINALIZE() \
« no previous file with comments | « Source/core/xmlhttprequest/XMLHttpRequest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698