W3C home > Mailing lists > Public > whatwg@whatwg.org > September 2015

Re: [whatwg] Handling out of memory issues with getImageData/createImageData

From: Mark S. Miller <erights@google.com>
Date: Sun, 27 Sep 2015 08:52:20 -0700
Message-ID: <CABHxS9g50U8gYcKv74ukk4sPOTx5pB-uV7hP-qbf+HT0TXs+ow@mail.gmail.com>
To: Rik Cabanier <cabanier@gmail.com>
Cc: whatwg <whatwg@lists.whatwg.org>, Boris Zbarsky <bzbarsky@mit.edu>
Since my post is about the more general OOM issue, I have shifted the
discussion to es-discuss
https://mail.mozilla.org/pipermail/es-discuss/2015-September/044267.html
Please continue discussion of the non-browser-specific issue there.


On Sun, Sep 27, 2015 at 8:33 AM, Mark S. Miller <erights@google.com> wrote:

> I should make it clear that my post is not concerned about OOM for image
> data -- the original subject of this thread -- but rather about the more
> general OOM question that Anne asks about.
>
>
> On Sat, Sep 26, 2015 at 9:15 PM, Rik Cabanier <cabanier@gmail.com> wrote:
>
>> On Fri, Sep 25, 2015 at 7:51 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>
>> > On 9/25/15 10:48 AM, Justin Novosad wrote:
>> >
>> >> I am sharing this here in case there would be interest in standardizing
>> >> this behavior.
>> >>
>> >
>> > I personally think it's a good idea (and throwing an exception is how
>> > Gecko handles, or at least aims to handle, this situation).
>>
>>
>> In the past, we discussed that error conditions such as this shouldn't
>> throw exceptions. Most of the time, this type of error is just temporal
>> and
>> is resolved in the next frame. Rare exceptions are almost never caught by
>> the author so the application crashes.
>>
>> Maybe for out of memory conditions, we could return a fake imagedata
>> object
>> with nothing but transparent white. In addition an 'isValid' property
>> could
>> signal if you have a real imagedata object.
>>
>
>
>
> --
>     Cheers,
>     --MarkM
>



-- 
    Cheers,
    --MarkM
Received on Sunday, 27 September 2015 15:52:46 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 17:00:35 UTC