Bug 1083611 - Use UniquePtr and fallible allocations. - r=kamidphish