[whatwg] createImageData
Maciej Stachowiak
mjs at apple.com
Fri Jun 13 01:43:56 PDT 2008
On Jun 9, 2008, at 8:25 PM, Jonas Sicking wrote:
> Vladimir Vukicevic wrote:
>> Sorry it took me a bit to respond here... so, ok, based on the
>> discussion, I'd suggest:
>> - user-created ImageData-like objects should be supported, e.g.
>> with language such as:
>
> Do note that dealing with user-created objects isn't trivial. You
> have to be prepared for dealing with the user-created object
> changing the whole world under you during a callback, this includes
> things like doing any modification to the canvas object itself, but
> also things like script navigating away and then causing a GC to
> tear down the world around you.
>
> This is usually not very hard to deal with, as long as you are not
> deep inside a long callstack when calling out to content. This is
> because you have to ensure that the whole callstack is ok with the
> world changing around it.
As an additional note: inn implementations that support getters and
setters, any property access to a user-created object may call back
into arbitrary JS code. Even in those that do not, a toNumber
conversion of an arbitrary JS value may call back into arbitrary JS
code.
Regards,
Maciej
More information about the whatwg
mailing list