Abuse Path?

20 views
Skip to first unread message

Doug Koellmer

unread,
Oct 3, 2012, 3:52:02 PM10/3/12
to google-ca...@googlegroups.com
In the Canvas Clock playground example, a setInterval call is made.  A corresponding clearInterval is called when the canvas element turns up null, which I'm guessing is supposed to be associated with the caja frame being killed somehow.  Obviously it's good practice to explicitly clean up after yourself, but I just want to make sure that fixing this issue: http://code.google.com/p/google-caja/issues/detail?id=1492 will make the clearInterval call unnecessary.

The reason I'm wondering is that currently a user not calling clearInterval is an abuse path, because it starts to spam errors when I kill the frame a la https://groups.google.com/forum/?fromgroups=#!topic/google-caja-discuss/QnuETYoDP_0.  You can replicate this by commenting out the whole if-block surrounding the clearInterval call in the playground example, then loading a different example...errors will start spamming the console.

Anyway, just wanted to make sure there's a path forward on it...not a huge deal.

Thanks!

Kevin Reid

unread,
Oct 3, 2012, 4:11:04 PM10/3/12
to google-ca...@googlegroups.com
On Wed, Oct 3, 2012 at 12:52 PM, Doug Koellmer <dou...@gmail.com> wrote:
In the Canvas Clock playground example, a setInterval call is made.  A corresponding clearInterval is called when the canvas element turns up null, which I'm guessing is supposed to be associated with the caja frame being killed somehow.  Obviously it's good practice to explicitly clean up after yourself, but I just want to make sure that fixing this issue: http://code.google.com/p/google-caja/issues/detail?id=1492 will make the clearInterval call unnecessary.

I don't think we'd previously thought about that. I've added a comment on the issue to explain what I think should be done; it shouldn't be hard.

Doug Koellmer

unread,
Oct 3, 2012, 6:02:25 PM10/3/12
to google-ca...@googlegroups.com
Great. I hope to be able to look into this myself, or delegate such, in a few weeks.  But of course I said that a few months ago.
Reply all
Reply to author
Forward
0 new messages