mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
Bug 1282273 - Replace the Runnable used for registering DecodePool threads with the Nuwa process with a lambda. r=edwin
This commit is contained in:
parent
dfd9e9a816
commit
9b38306626
@ -33,25 +33,6 @@ using std::min;
|
||||
namespace mozilla {
|
||||
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.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
@ -291,8 +272,10 @@ DecodePool::DecodePool()
|
||||
"Should successfully create image I/O thread");
|
||||
|
||||
#ifdef MOZ_NUWA_PROCESS
|
||||
nsCOMPtr<nsIRunnable> worker = new RegisterDecodeIOThreadWithNuwaRunnable();
|
||||
rv = mIOThread->Dispatch(worker, NS_DISPATCH_NORMAL);
|
||||
rv = mIOThread->Dispatch(NS_NewRunnableFunction([]() -> void {
|
||||
NuwaMarkCurrentThread(static_cast<void(*)(void*)>(nullptr), nullptr);
|
||||
}), NS_DISPATCH_NORMAL);
|
||||
|
||||
MOZ_RELEASE_ASSERT(NS_SUCCEEDED(rv),
|
||||
"Should register decode IO thread with Nuwa process");
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user