mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
parent
6a200d5284
commit
22f745761b
1 changed files with 9 additions and 0 deletions
|
|
@ -1136,6 +1136,15 @@ nsPluginHost::GetPlugins(nsTArray<nsCOMPtr<nsIInternalPluginTag>>& aPluginArray,
|
|||
}
|
||||
plugin = plugin->mNext;
|
||||
}
|
||||
|
||||
// Durstenfeld shuffle
|
||||
size_t pluginCount = aPluginArray.Length();
|
||||
if (pluginCount >= 2) {
|
||||
for (size_t i = pluginCount - 1; i > 0; i--) {
|
||||
size_t j = rand() % (i + 1);
|
||||
std::swap(aPluginArray[i],aPluginArray[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME-jsplugins Check users for order of fake v non-fake
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue