Back out bug 745662 (changeset b938f2e550c0) -- it's done its job, triggered the crash we were looking for.

This commit is contained in:
Justin Lebar 2012-04-18 13:22:20 +10:00
Родитель 7fe7250e5e
Коммит 4c3f427e1c
2 изменённых файлов: 0 добавлений и 23 удалений

Просмотреть файл

@ -45,8 +45,6 @@ DiscardTimeoutChangedCallback(const char* aPref, void *aClosure)
nsresult
DiscardTracker::Reset(Node *node)
{
EnsureMainThread();
// We shouldn't call Reset() with a null |img| pointer, on images which can't
// be discarded, or on animated images (which should be marked as
// non-discardable, anyway).
@ -86,8 +84,6 @@ DiscardTracker::Reset(Node *node)
void
DiscardTracker::Remove(Node *node)
{
EnsureMainThread();
if (node->isInList())
node->remove();
@ -101,8 +97,6 @@ DiscardTracker::Remove(Node *node)
void
DiscardTracker::Shutdown()
{
EnsureMainThread();
if (sTimer) {
sTimer->Cancel();
sTimer = NULL;
@ -115,8 +109,6 @@ DiscardTracker::Shutdown()
void
DiscardTracker::DiscardAll()
{
EnsureMainThread();
if (!sInitialized)
return;
@ -134,8 +126,6 @@ DiscardTracker::DiscardAll()
void
DiscardTracker::InformAllocation(PRInt64 bytes)
{
EnsureMainThread();
// This function is called back e.g. from RasterImage::Discard(); be careful!
sCurrentDecodedImageBytes += bytes;
@ -146,17 +136,6 @@ DiscardTracker::InformAllocation(PRInt64 bytes)
MaybeDiscardSoon();
}
void
DiscardTracker::EnsureMainThread()
{
// NS_RUNTIMEABORT is a fatal crash even in release builds. We need to crash
// release builds here in order to investigate bug 745141 -- we're being
// called from off main thread, but we don't know how!
if (!NS_IsMainThread()) {
NS_RUNTIMEABORT("Must be on main thread!");
}
}
/**
* Initialize the tracker.
*/

Просмотреть файл

@ -100,8 +100,6 @@ class DiscardTracker
static void TimerCallback(nsITimer *aTimer, void *aClosure);
static void DiscardNow();
static void EnsureMainThread();
static LinkedList<Node> sDiscardableImages;
static nsCOMPtr<nsITimer> sTimer;
static bool sInitialized;