Bug 1201666 Comment 6 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I agree with comment 2.

I think we want to preserve a fallible behavior here, because blobs can be large and we likely don't want a failed allocation to be fatal here.
Since I doubt we can do this at the constructor level without making this API fancy, I guess the best we can do is track a status mIsValid property that will likely be true for everything but the non-adopted blob variant (where it will depend on the result of AppendElements).
Then we can use it to bailout from asArray with an NS_ERROR_OUT_OF_MEMORY.
I'm not sure how we could write an automated test for that though.

Back to Bug 1201666 Comment 6