[Webkit-unassigned] [Bug 40071] Objects invoking script need to know when the relevant ScriptExecutionContext has torn down.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 2 13:23:22 PDT 2010


--- Comment #5 from Jeremy Orlow <jorlow at chromium.org>  2010-06-02 13:23:21 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > Ahhh!  I'm an idiot.  You should be using ActiveDOMObject for this case. 
> > Everywhere I can think of that you'd need to worry about your context going
> > away you'd also need to worry about the page being suspended and such.
> Are you sure about this? I'm not very familiar with ActiveDOMObject but I'd imagined that it only notifies an object about changes to the script context for the frame that owns the object. We need to know about the state of all the script contexts from which the object's methods were invoked and hence we must make callbacks in.

When you create a subclass of ActiveDOMObject you need to supply the ScriptExecutionContext* to the constructor.  This is what determines which ScriptExecutionContext you watch.  If you're not sure what should implement the ActiveDOMObject in geoLocation, I'm happy to look at that with you tomorrow.  For indexedDB, the answer is IDBRequest.  Whenever any other ____Request object instantiates it, it'll pass in the current ScriptExecutionContext and everything should work out fine.  In WebSQLDatabase, the callback object itself should be an active dom object.  I imagine geolocation is similar.

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