Bug 932851 - Do not read from empty buffers when discarding, r=jorendorff

--HG--
extra : rebase_source : c7e537f280ee0b35c67a7aee9ad4d4b60d646dbd