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

Re: [UndoManager] Disallowing live UndoManager on detached nodes

From: Ryosuke Niwa <rniwa@webkit.org>
Date: Tue, 21 Aug 2012 09:36:39 -0700
Message-ID: <CABNRm633SV1XyQHEOqwEPnFnd2PhGxnzVg+MOUF2nH=UkJ0zuw@mail.gmail.com>
To: Jonas Sicking <jonas@sicking.cc>
Cc: Ehsan Akhgari <ehsan@mozilla.com>, Sukolsak Sakshuwong <sukolsak@google.com>, Kentaro Hara <haraken@chromium.org>, Maciej Stachowiak <mjs@apple.com>, Adam Barth <abarth@webkit.org>, Olli Pettay <Olli.Pettay@helsinki.fi>, public-webapps <public-webapps@w3.org>, Ojan Vafai <ojan@chromium.org>
On Tue, Aug 21, 2012 at 1:54 AM, Jonas Sicking <jonas@sicking.cc> wrote:

> On Mon, Aug 20, 2012 at 11:56 PM, Ryosuke Niwa <rniwa@webkit.org> wrote:
> > No. Allowing the host to be moved without removing automatic transaction
> is
> > what causes the problem because automatic transactions need to keep
> relevant
> > nodes alive.
> >
> > Essentially, this has the same problem has the magic iframe. We can
> > alternatively change the way automatic transactions work so that they
> don't
> > retain the original nodes but that model has its own problems.
>
> I'm not entirely sure what "the magic iframe" is. But this simply
> seems like a shortcoming in the WebKit memory model. Dealing with
> cycles in C++ objects is a solved problem in Gecko and I'm surprised
> if this doesn't happen in other situations in WebKit too.
>

It is, but we're not about to re-design our GC model for this single
feature.

How do you for example deal with the fact that if you create two
> nodes, A and B, and make A a child of B. As long as a reference is
> held to either A or B you need to keep both nodes alive. But as soon
> as the only thing holding references to A and B are just A and B, both
> nodes need to be GCed.
>

We have a very delicate mechanism for that, which cannot be re-used here.

Implementing undo manager has been a complete nightmare for us, and if we
can't even make this change to the spec, we're probably going to abandon
the current specification and not implement it since it's unimplementable
for all practical purposes.

- Ryosuke
Received on Tuesday, 21 August 2012 16:37:32 GMT

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