auto merge of #5161 : glennw/servo/workaround-race, r=pcwalton
auto merge of #5161 : glennw/servo/workaround-race, r=pcwalton

A race condition exists where pipelines that are removed from a document
may not ever trigger a paint for that pipeline. The compositor relies
on a paint occurring for each pipeline before outputting the image when
in reftest mode.

snf/servo,jimberlage/servo,nick-thompson/servo,saneyuki/servo,A-deLuna/servo,s142857/servo,dsandeephegde/servo,boghison/servo,cbrewster/servo,szeged/servo,jdramani/servo,steveklabnik/servo,nrc/servo,pyfisch/servo,deokjinkim/servo,GyrosOfWar/servo,nnethercote/servo,mdibaiee/servo,RenaudParis/servo,eddyb/servo,codemac/servo,emilio/servo,steveklabnik/servo,luniv/servo,walac/servo,youprofit/servo,dagnir/servo,karlito40/servo,pyecs/servo,KiChjang/servo,runarberg/servo,saratang/servo,huonw/servo,dsandeephegde/servo,mdibaiee/servo,thiagopnts/servo,thiagopnts/servo,s142857/servo,tschneidereit/servo,canaltinova/servo,jdramani/servo,aidanhs/servo,GreenRecycleBin/servo,WriterOfAlicrow/servo,caldwell/servo,emilio/servo,luniv/servo,hyowon/servo,dhananjay92/servo,tempbottle/servo,samfoo/servo,samfoo/servo,g-k/servo,echochamber/servo,larsbergstrom/servo,runarberg/servo,vks/servo,nnethercote/servo,brendandahl/servo,zhangjunlei26/servo,rixrix/servo,sadmansk/servo,nick-thompson/servo,DominoTree/servo,splav/servo,rixrix/servo,AnthonyBroadCrawford/servo,zhangjunlei26/servo,KiChjang/servo,notriddle/servo,bjwbell/servo,ryancanhelpyou/servo,DominoTree/servo,rentongzhang/servo,rnestler/servo,echochamber/servo,dvberkel/servo,larsbergstrom/servo,pyfisch/servo,walac/servo,pyfisch/servo,sadmansk/servo,larsbergstrom/servo,g-k/servo,mattnenterprise/servo,nerith/servo,cbrewster/servo,g-k/servo,pyfisch/servo,saneyuki/servo,avadacatavra/servo,DominoTree/servo,Adenilson/prototype-viewing-distance,tafia/servo,GreenRecycleBin/servo,splav/servo,boghison/servo,akosel/servo,zhangjunlei26/servo,emilio/servo,echochamber/servo,nerith/servo,RenaudParis/servo,CJ8664/servo,rixrix/servo,j3parker/servo,akosel/servo,youprofit/servo,szeged/servo,dhananjay92/servo,runarberg/servo,runarberg/servo,rixrix/servo,mbrubeck/servo,caldwell/servo,dsandeephegde/servo,mdibaiee/servo,paulrouget/servo,szeged/servo,A-deLuna/servo,youprofit/servo,g-k/servo,mt2d2/servo,emilio/servo,DominoTree/servo,youprofit/servo,rentongzhang/servo,meh/servo,saratang/servo,jdramani/servo,ConnorGBrewster/servo,GreenRecycleBin/servo,jimberlage/servo,indykish/servo,indykish/servo,CJ8664/servo,pyfisch/servo,A-deLuna/servo,ConnorGBrewster/servo,larsbergstrom/servo,karlito40/servo,pgonda/servo,brendandahl/servo,cbrewster/servo,s142857/servo,kindersung/servo,tafia/servo,tafia/servo,eddyb/servo,aidanhs/servo,bjwbell/servo,boghison/servo,akosel/servo,zentner-kyle/servo,mdibaiee/servo,mt2d2/servo,mt2d2/servo,pyfisch/servo,pyfisch/servo,nnethercote/servo,echochamber/servo,szeged/servo,A-deLuna/servo,aidanhs/servo,caldwell/servo,canaltinova/servo,deokjinkim/servo,avadacatavra/servo,thiagopnts/servo,brendandahl/servo,dsandeephegde/servo,peterjoel/servo,snf/servo,aidanhs/servo,nick-thompson/servo,AnthonyBroadCrawford/servo,jgraham/servo,CJ8664/servo,snf/servo,CJ8664/servo,AnthonyBroadCrawford/servo,dati91/servo,wpgallih/servo,saneyuki/servo,mbrubeck/servo,CJ8664/servo,karlito40/servo,indykish/servo,indykish/servo,g-k/servo,DominoTree/servo,larsbergstrom/servo,dagnir/servo,luniv/servo,Adenilson/prototype-viewing-distance,peterjoel/servo,j3parker/servo,jlegendary/servo,luniv/servo,saneyuki/servo,SimonSapin/servo,KiChjang/servo,ConnorGBrewster/servo,codemac/servo,kindersung/servo,SimonSapin/servo,vks/servo,anthgur/servo,tempbottle/servo,CJ8664/servo,nnethercote/servo,Adenilson/prototype-viewing-distance,GreenRecycleBin/servo,GyrosOfWar/servo,jlegendary/servo,KiChjang/servo,wartman4404/servo,avadacatavra/servo,splav/servo,mt2d2/servo,srbhklkrn/SERVOENGINE,saneyuki/servo,saneyuki/servo,huonw/servo,mattnenterprise/servo,larsbergstrom/servo,WriterOfAlicrow/servo,steveklabnik/servo,fiji-flo/servo,canaltinova/servo,bjwbell/servo,brendandahl/servo,dati91/servo,walac/servo,evilpie/servo,saneyuki/servo,upsuper/servo,saratang/servo,saneyuki/servo,wartman4404/servo,steveklabnik/servo,srbhklkrn/SERVOENGINE,meh/servo,mattnenterprise/servo,aweinstock314/servo,dagnir/servo,Adenilson/prototype-viewing-distance,huonw/servo,mdibaiee/servo,j3parker/servo,hyowon/servo,pyecs/servo,avadacatavra/servo,jimberlage/servo,g-k/servo,splav/servo,splav/servo,ryancanhelpyou/servo,KiChjang/servo,walac/servo,anthgur/servo,runarberg/servo,pgonda/servo,jgraham/servo,meh/servo,evilpie/servo,caldwell/servo,upsuper/servo,sadmansk/servo,mbrubeck/servo,GreenRecycleBin/servo,tempbottle/servo,mbrubeck/servo,aidanhs/servo,saratang/servo,nrc/servo,vks/servo,evilpie/servo,tempbottle/servo,snf/servo,runarberg/servo,huonw/servo,deokjinkim/servo,notriddle/servo,paulrouget/servo,steveklabnik/servo,mbrubeck/servo,evilpie/servo,larsbergstrom/servo,snf/servo,dati91/servo,WriterOfAlicrow/servo,saratang/servo,jimberlage/servo,emilio/servo,snf/servo,akosel/servo,nerith/servo,jlegendary/servo,wartman4404/servo,samfoo/servo,anthgur/servo,sadmansk/servo,meh/servo,paulrouget/servo,paulrouget/servo,rixrix/servo,pyecs/servo,j3parker/servo,aidanhs/servo,Adenilson/prototype-viewing-distance,luniv/servo,bjwbell/servo,rnestler/servo,meh/servo,dati91/servo,nick-thompson/servo,GreenRecycleBin/servo,karlito40/servo,paulrouget/servo,samfoo/servo,pyfisch/servo,Adenilson/prototype-viewing-distance,ryancanhelpyou/servo,aweinstock314/servo,samfoo/servo,peterjoel/servo,srbhklkrn/SERVOENGINE,wartman4404/servo,A-deLuna/servo,nnethercote/servo,deokjinkim/servo,caldwell/servo,notriddle/servo,splav/servo,emilio/servo,peterjoel/servo,tafia/servo,rentongzhang/servo,hyowon/servo,aweinstock314/servo,AnthonyBroadCrawford/servo,fiji-flo/servo,luniv/servo,tempbottle/servo,bjwbell/servo,aweinstock314/servo,notriddle/servo,upsuper/servo,peterjoel/servo,zentner-kyle/servo,srbhklkrn/SERVOENGINE,indykish/servo,j3parker/servo,GyrosOfWar/servo,rnestler/servo,szeged/servo,dati91/servo,nerith/servo,steveklabnik/servo,walac/servo,sadmansk/servo,larsbergstrom/servo,zhangjunlei26/servo,cbrewster/servo,dsandeephegde/servo,fiji-flo/servo,hyowon/servo,WriterOfAlicrow/servo,mdibaiee/servo,KiChjang/servo,szeged/servo,jdramani/servo,paulrouget/servo,nerith/servo,szeged/servo,ConnorGBrewster/servo,saratang/servo,mattnenterprise/servo,DominoTree/servo,peterjoel/servo,karlito40/servo,cbrewster/servo,dsandeephegde/servo,ryancanhelpyou/servo,evilpie/servo,ryancanhelpyou/servo,deokjinkim/servo,rentongzhang/servo,deokjinkim/servo,akosel/servo,nick-thompson/servo,wartman4404/servo,dvberkel/servo,indykish/servo,GyrosOfWar/servo,dsandeephegde/servo,avadacatavra/servo,rixrix/servo,GreenRecycleBin/servo,nrc/servo,anthgur/servo,srbhklkrn/SERVOENGINE,SimonSapin/servo,mattnenterprise/servo,jgraham/servo,mt2d2/servo,emilio/servo,RenaudParis/servo,dvberkel/servo,RenaudParis/servo,hyowon/servo,emilio/servo,KiChjang/servo,splav/servo,hyowon/servo,pyecs/servo,szeged/servo,dagnir/servo,SimonSapin/servo,ConnorGBrewster/servo,paulrouget/servo,SimonSapin/servo,pyfisch/servo,pyfisch/servo,peterjoel/servo,notriddle/servo,thiagopnts/servo,snf/servo,notriddle/servo,zhangjunlei26/servo,pgonda/servo,jlegendary/servo,codemac/servo,anthgur/servo,eddyb/servo,GyrosOfWar/servo,wpgallih/servo,jimberlage/servo,g-k/servo,dagnir/servo,dhananjay92/servo,echochamber/servo,bjwbell/servo,AnthonyBroadCrawford/servo,notriddle/servo,notriddle/servo,CJ8664/servo,s142857/servo,A-deLuna/servo,dhananjay92/servo,kindersung/servo,jlegendary/servo,rnestler/servo,evilpie/servo,pyecs/servo,indykish/servo,anthgur/servo,wpgallih/servo,dati91/servo,tschneidereit/servo,mbrubeck/servo,A-deLuna/servo,aweinstock314/servo,canaltinova/servo,larsbergstrom/servo,zhangjunlei26/servo,mbrubeck/servo,RenaudParis/servo,tafia/servo,wartman4404/servo,jgraham/servo,zentner-kyle/servo,karlito40/servo,rentongzhang/servo,nick-thompson/servo,codemac/servo,aweinstock314/servo,sadmansk/servo,SimonSapin/servo,CJ8664/servo,dagnir/servo,hyowon/servo,AnthonyBroadCrawford/servo,szeged/servo,DominoTree/servo,splav/servo,SimonSapin/servo,mt2d2/servo,nnethercote/servo,s142857/servo,codemac/servo,fiji-flo/servo,nnethercote/servo,dsandeephegde/servo,avadacatavra/servo,nnethercote/servo,akosel/servo,cbrewster/servo,tempbottle/servo,srbhklkrn/SERVOENGINE,zentner-kyle/servo,jlegendary/servo,srbhklkrn/SERVOENGINE,WriterOfAlicrow/servo,anthgur/servo,emilio/servo,avadacatavra/servo,DominoTree/servo,tschneidereit/servo,szeged/servo,rnestler/servo,pgonda/servo,pgonda/servo,boghison/servo,jimberlage/servo,jgraham/servo,GyrosOfWar/servo,WriterOfAlicrow/servo,nrc/servo,samfoo/servo,rentongzhang/servo,nrc/servo,steveklabnik/servo,mattnenterprise/servo,kindersung/servo,peterjoel/servo,notriddle/servo,rixrix/servo,tschneidereit/servo,rixrix/servo,upsuper/servo,anthgur/servo,paulrouget/servo,emilio/servo,dhananjay92/servo,jdramani/servo,kindersung/servo,tschneidereit/servo,jimberlage/servo,ConnorGBrewster/servo,vks/servo,nnethercote/servo,jimberlage/servo,brendandahl/servo,splav/servo,youprofit/servo,dhananjay92/servo,zhangjunlei26/servo,tafia/servo,paulrouget/servo,jdramani/servo,zentner-kyle/servo,rixrix/servo,upsuper/servo,mt2d2/servo,karlito40/servo,DominoTree/servo,pyecs/servo,samfoo/servo,youprofit/servo,saneyuki/servo,tafia/servo,nick-thompson/servo,dati91/servo,rentongzhang/servo,KiChjang/servo,SimonSapin/servo,jlegendary/servo,nrc/servo,tschneidereit/servo,jgraham/servo,cbrewster/servo,wpgallih/servo,nerith/servo,eddyb/servo,dhananjay92/servo,wpgallih/servo,caldwell/servo,s142857/servo,ryancanhelpyou/servo,kindersung/servo,upsuper/servo,indykish/servo,rnestler/servo,vks/servo,GreenRecycleBin/servo,nnethercote/servo,kindersung/servo,ConnorGBrewster/servo,evilpie/servo,eddyb/servo,dvberkel/servo,rnestler/servo,fiji-flo/servo,dvberkel/servo,cbrewster/servo,echochamber/servo,zentner-kyle/servo,RenaudParis/servo,deokjinkim/servo,caldwell/servo,vks/servo,notriddle/servo,huonw/servo,walac/servo,walac/servo,boghison/servo,canaltinova/servo,nerith/servo,thiagopnts/servo,saneyuki/servo,wpgallih/servo,pgonda/servo,j3parker/servo,aidanhs/servo,bjwbell/servo,dvberkel/servo,wpgallih/servo,Adenilson/prototype-viewing-distance,s142857/servo,mbrubeck/servo,boghison/servo,nrc/servo,wpgallih/servo,rnestler/servo,paulrouget/servo,pyecs/servo,thiagopnts/servo,canaltinova/servo,GreenRecycleBin/servo,upsuper/servo,indykish/servo,echochamber/servo,meh/servo,luniv/servo,huonw/servo,tschneidereit/servo,larsbergstrom/servo,canaltinova/servo,dati91/servo,vks/servo,eddyb/servo,codemac/servo,mdibaiee/servo,brendandahl/servo,KiChjang/servo,meh/servo,j3parker/servo,zhangjunlei26/servo,zhangjunlei26/servo,splav/servo,evilpie/servo,tempbottle/servo,WriterOfAlicrow/servo,brendandahl/servo,upsuper/servo,fiji-flo/servo,GyrosOfWar/servo,jimberlage/servo,jdramani/servo,canaltinova/servo,mattnenterprise/servo,DominoTree/servo,dvberkel/servo,fiji-flo/servo,dagnir/servo,fiji-flo/servo,AnthonyBroadCrawford/servo,jgraham/servo,peterjoel/servo,saratang/servo,runarberg/servo,sadmansk/servo,codemac/servo,sadmansk/servo,akosel/servo,thiagopnts/servo,RenaudParis/servo,wartman4404/servo,aweinstock314/servo,peterjoel/servo,mattnenterprise/servo,pgonda/servo,wpgallih/servo,eddyb/servo,evilpie/servo,thiagopnts/servo,zentner-kyle/servo,KiChjang/servo,boghison/servo,ConnorGBrewster/servo,huonw/servo,avadacatavra/servo,eddyb/servo,ryancanhelpyou/servo,youprofit/servo