mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-27 04:05:32 +00:00
Bug 902426 - Do not allow duplicate entries in the CRC2D demotion list r=mattwoodrow
--HG-- extra : rebase_source : c7c344f2b88065f46c06c99fa0bf868367b6b9ab
This commit is contained in:
parent
5e0ba3b426
commit
c11ce45a79
@ -797,6 +797,10 @@ CanvasRenderingContext2D::DemoteOldestContextIfNecessary()
|
||||
void
|
||||
CanvasRenderingContext2D::AddDemotableContext(CanvasRenderingContext2D* context)
|
||||
{
|
||||
std::vector<CanvasRenderingContext2D*>::iterator iter = std::find(DemotableContexts().begin(), DemotableContexts().end(), context);
|
||||
if (iter != DemotableContexts().end())
|
||||
return;
|
||||
|
||||
DemotableContexts().push_back(context);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user