Bug 913558 - Improve GGC store buffer threadsafe assertions, r=terrence.

This commit is contained in:
Brian Hackett 2013-09-10 08:41:14 -07:00
parent e8e949fa37
commit 625036f1ac

View File

@ -120,7 +120,7 @@ class StoreBuffer
/* Add one item to the buffer. */
void put(const T &t) {
mozilla::ReentrancyGuard g(*this);
JS_ASSERT(!owner->inParallelSection());
JS_ASSERT(CurrentThreadCanAccessRuntime(owner->runtime));
if (!enabled_)
return;
@ -159,7 +159,7 @@ class StoreBuffer
/* Record a removal from the buffer. */
void unput(const T &v) {
JS_ASSERT(!this->owner->inParallelSection());
JS_ASSERT(CurrentThreadCanAccessRuntime(this->owner->runtime));
MonoTypeBuffer<T>::put(v.tagged());
}
};
@ -194,7 +194,7 @@ class StoreBuffer
template <typename T>
void put(const T &t) {
mozilla::ReentrancyGuard g(*this);
JS_ASSERT(!owner->inParallelSection());
JS_ASSERT(CurrentThreadCanAccessRuntime(owner->runtime));
/* Ensure T is derived from BufferableRef. */
(void)static_cast<const BufferableRef*>(&t);