Patch By Xiaoou Wu <xiaoou.wu@oracle.com> and Max Kanat-Alexander <mkanat@bugzilla.org> r=mkanat, a=mkanat