mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 10:44:56 +00:00
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:
parent
d1637b9c5a
commit
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user