Masterfoods has said that it is going to stop marketing to children under 12-years-old by the end of the year.