[Webkit-unassigned] [Bug 14455] Autogenerate the JS bindings for the StyleSheetList

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Jun 30 17:47:09 PDT 2007


http://bugs.webkit.org/show_bug.cgi?id=14455





------- Comment #4 from darin at apple.com  2007-06-30 17:47 PDT -------
(In reply to comment #3)
> This will never be called if element is 0 as it is only called after the
> canGetItemsForName() function which checks.

I'd like to see a comment and perhaps an assertion to make that clear.

> > +HTMLStyleElement* StyleSheetList::getNamedItem(const String& name) const
> > +{
> > +    Element* element = m_doc->getElementById(name);
> > 
> > What guarantees the document in m_doc has not yet been destroyed?
> 
> Now, I am not 100% sure, but since Document is the only one that creates and
> the StyleSheetList and stores it and it should be deleted when it is destroyed
> this should not be an issue. 

Unfortunately, that's not true. If some JavaScript code gets a reference to a
StyleSheetList and then the document goes away, the JavaScript wrapper will
keep the StyleSheetList alive. We need to add code to either ref the document
(and make sure we don't create any circular references) or to zero out the
reference to the document when the document is deleted.


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



More information about the webkit-unassigned mailing list