Upstream changes from feed branch, getting them in here so they can be localized in advance of merge (bug 1055851).

r? @clouserw