Hi Morten, Listeners are implicitly referenced by a DOM node wrapper for a node to which they are attached.
http://code.google.com/searchframe#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/bindings/v8/V8GCController.cpp&exact_package=chromium&q=addimplicitreference&type=cs&l=332 This keeps them alive as long as wrapper is alive. -- Vyacheslav Egorov On Aug 20, 2012 6:04 PM, "Morten Olsen" <[email protected]> wrote: > Hi, > > I'm struggling to figure out precisely what/where keeps an anonymous > function alive when used as an event handler in the WebKit integration, > example: > > document.getElementById("clickMe").addEventListener('click', function (e) > { alert(e); }); > > WebKit only keeps a weak pointer to the function, and I can't figure out > how its kept alive through GC, as I can't seem to find a live pointer to it > anywhere else, but I must be overlooking something. > > Regards, Morten > > -- > v8-users mailing list > [email protected] > http://groups.google.com/group/v8-users -- v8-users mailing list [email protected] http://groups.google.com/group/v8-users
