Backed out changeset 1c4cdf7294f4 (bug 1021443) until its dependent refactoring lands.