Bug 722163 - Convert JumpListBuilder to use LazyIdleThread. r=khuey

This commit is contained in:
Malen Sok 2012-03-06 15:42:53 -05:00
parent aa656b2fde
commit fd0cf175a4

View File

@ -56,6 +56,10 @@
#include "nsStringStream.h"
#include "nsNetUtil.h"
#include "nsThreadUtils.h"
#include "mozilla/LazyIdleThread.h"
// The amount of time, in milliseconds, that our IO thread will stay alive after the last event it processes.
#define DEFAULT_THREAD_TIMEOUT_MS 30000
namespace mozilla {
namespace widget {
@ -85,7 +89,8 @@ JumpListBuilder::JumpListBuilder() :
CoCreateInstance(CLSID_DestinationList, NULL, CLSCTX_INPROC_SERVER,
IID_ICustomDestinationList, getter_AddRefs(mJumpListMgr));
NS_NewThread(getter_AddRefs(mIOThread));
// Make a lazy thread for any IO
mIOThread = new LazyIdleThread(DEFAULT_THREAD_TIMEOUT_MS, LazyIdleThread::ManualShutdown);
Preferences::AddStrongObserver(this, kPrefTaskbarEnabled);
}