зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1372405
- Change SchedulerGroup::GetName so it doesn't delegate to mozilla::Runnable (r=froydnj)
Delegating to mozilla::Runnable caused us to return the wrong value once SchedulerGroup started passing a non-empty name to the Runnable constructor. MozReview-Commit-ID: 2zMlpiMnHwv
This commit is contained in:
Родитель
d1637b9c5a
Коммит
8fb9da1035
|
@ -339,17 +339,15 @@ SchedulerGroup::Runnable::Runnable(already_AddRefed<nsIRunnable>&& aRunnable,
|
|||
NS_IMETHODIMP
|
||||
SchedulerGroup::Runnable::GetName(nsACString& aName)
|
||||
{
|
||||
mozilla::Runnable::GetName(aName);
|
||||
if (aName.IsEmpty()) {
|
||||
// Try to get a name from the underlying runnable.
|
||||
nsCOMPtr<nsINamed> named = do_QueryInterface(mRunnable);
|
||||
if (named) {
|
||||
named->GetName(aName);
|
||||
}
|
||||
if (aName.IsEmpty()) {
|
||||
aName.AssignLiteral("anonymous");
|
||||
}
|
||||
// Try to get a name from the underlying runnable.
|
||||
nsCOMPtr<nsINamed> named = do_QueryInterface(mRunnable);
|
||||
if (named) {
|
||||
named->GetName(aName);
|
||||
}
|
||||
if (aName.IsEmpty()) {
|
||||
aName.AssignLiteral("anonymous");
|
||||
}
|
||||
|
||||
aName.AppendASCII("(labeled)");
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче