W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Re: [DOMCore] Traversal

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 22 Jul 2011 13:01:19 -0700
Message-ID: <CA+c2ei_sHQEgc_JyASEgGanTdLDMYMgBz7Hpij9TPmUANnxwKA@mail.gmail.com>
To: Anne van Kesteren <annevk@opera.com>
Cc: WebApps WG <public-webapps@w3.org>
On Fri, Jul 22, 2011 at 11:08 AM, Anne van Kesteren <annevk@opera.com> wrote:
> On Fri, 22 Jul 2011 19:46:36 +0200, Jonas Sicking <jonas@sicking.cc> wrote:
>>
>> This is not the case in gecko. We don't have any specific recursion
>> detecting code here. We just use the generic "javascript is recursing
>> too deep" detection code. So if you just recur once, that works just
>> fine and dandy. But if you recurse infinitely, you'll get an
>> exception.
>>
>> I'd much rather depend on that rather than plugging recursion
>> protection leaks in any API that uses callbacks (there's a lot). This
>> seems better both from a user point of view, and from an
>> implementation point of view.
>
> http://mxr.mozilla.org/mozilla-central/source/content/base/src/nsTraversal.cpp#77

Ah, right, allowing iteration during iteration does indeed create a
lot of hard-to-define edge cases, so just throwing seems like the
simplest thing to do unfortunately.

For posterity, we did this in response to [1]

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=559526

/ Jonas
Received on Friday, 22 July 2011 20:02:25 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:46 GMT