ETOPs certification could be a factor to consider in the decision making process. If you’re in an aircraft which it’s alright to be 2 or 3 hours over the ocean from a suitable airport, then continuing to destination should be a lower risk factor than a non ETOPs aircraft. Obviously not applicable in the AirAsia case with an engine shaking itself to pieces.
I believe QF have a number of airports in Indonesia which they don’t approve for emergency use and would overfly in the event of an engine shutdown. PIC would make his own decision in the event of an un extinguishable engine fire or something similar.