[Webkit-unassigned] [Bug 29077] [v8] Share persistent context handles between events

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Sep 11 02:16:01 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=29077


Adam Barth <abarth at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ager at chromium.org




--- Comment #11 from Adam Barth <abarth at webkit.org>  2009-09-11 02:16:00 PDT ---
> Before, each OwnHandle had its own persistent handle it needed to manager.  Now
> the event is sharing the handle of the frame or isolated world to which it
> belongs the owner takes care of that.

But you see that the lifetime of the handle has changed right?  We need to
think carefully and make sure that the new lifetime is ok for the event
listeners.  The key point is that the event listeners won't fire when they
ought not to fire.  We have some amount of test coverage for this, but it's not
complete.

Maybe we're ok because V8Proxy explicitly Disposes / Clears the shared context
when it would have dropped its strong handle before?

> > Also,
> > 
> > -    m_context.MakeWeak(this, &contextWeakReferenceCallback);
> > +    m_context->get().MakeWeak(this, &contextWeakReferenceCallback);
> > 
> > in V8IsolatedWorld.cpp.  Won't that make the shared handle weak?  Doesn't
> > V8Proxy need to hold a strong reference to the context?
> 
> Yes, it will make the shared handle weak.  But that's no different from how it
> was before really except that before there was as many handles as there were
> event listeners, all of them weak, whereas now there is just one.

The whole thing is super confusing though.  If you're in the main world, it
just so happens that the shared context is a strong reference to the context,
but when you're in an isolated world, the shared handle is weak.  All the
clients of V8Proxy::context(Frame*) now have to be prepared to deal with either
case.

Maybe we're ok because these clients already have to worry about this issue?

Anyway, it's after 2 a.m. here.  I'll take a look at it again tomorrow when I'm
more awake.

Ager, any insight that you have would be appreciated.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list