зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1282273 - Replace the Runnable used for registering DecodePool threads with the Nuwa process with a lambda. r=edwin
This commit is contained in:
Родитель
dfd9e9a816
Коммит
9b38306626
|
@ -33,25 +33,6 @@ using std::min;
|
||||||
namespace mozilla {
|
namespace mozilla {
|
||||||
namespace image {
|
namespace image {
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
// Helper runnables.
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
#ifdef MOZ_NUWA_PROCESS
|
|
||||||
|
|
||||||
class RegisterDecodeIOThreadWithNuwaRunnable : public Runnable
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
NS_IMETHOD Run()
|
|
||||||
{
|
|
||||||
NuwaMarkCurrentThread(static_cast<void(*)(void*)>(nullptr), nullptr);
|
|
||||||
return NS_OK;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // MOZ_NUWA_PROCESS
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// DecodePool implementation.
|
// DecodePool implementation.
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
@ -291,8 +272,10 @@ DecodePool::DecodePool()
|
||||||
"Should successfully create image I/O thread");
|
"Should successfully create image I/O thread");
|
||||||
|
|
||||||
#ifdef MOZ_NUWA_PROCESS
|
#ifdef MOZ_NUWA_PROCESS
|
||||||
nsCOMPtr<nsIRunnable> worker = new RegisterDecodeIOThreadWithNuwaRunnable();
|
rv = mIOThread->Dispatch(NS_NewRunnableFunction([]() -> void {
|
||||||
rv = mIOThread->Dispatch(worker, NS_DISPATCH_NORMAL);
|
NuwaMarkCurrentThread(static_cast<void(*)(void*)>(nullptr), nullptr);
|
||||||
|
}), NS_DISPATCH_NORMAL);
|
||||||
|
|
||||||
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv),
|
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv),
|
||||||
"Should register decode IO thread with Nuwa process");
|
"Should register decode IO thread with Nuwa process");
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче