[Webkit-unassigned] [Bug 21810] Remove use of static C++ objects that are destroyed at exit time (destructors)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 27 13:20:04 PDT 2008


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


darin at apple.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |darin at apple.com
            Summary|Remove use of static C++    |Remove use of static C++
                   |objects                     |objects that are destroyed
                   |                            |at exit time (destructors)




------- Comment #7 from darin at apple.com  2008-10-27 13:20 PDT -------
1) We're not going to remove all use of static C++ objects, so the title of
this bug is bogus. I've retitled.

2) The check-for-global-initializers script checks for objects with global
initializers. Those are objects that are initialized at library load time.

3) What Greg is after is eliminating global objects with exit-time destructor
calls. I think it's reasonable to get rid of those. We already use a coding
style that avoids them. It could speed up process termination for any program
using WebKit and has the benefit Greg mentioned for the project he's working
on.

The script to grep for all static objects is a mistake. We need something that
finds only statics that have exit-time destructor code.

All the examples cited in this bug so far, such as timerHeap,
timersReadyToFire, and gFunctionMap, are already fine. They don't have any
exit-time destructors. But there are lots of objects that do have them. Such as
staticWrapperSet in JSDOMBinding.cpp. The trick is to find some way to locate
all of those.

However, in debug builds we use these exit-time destructors to log error
messages after all other cleanup is complete. I'm not sure what the right thing
to do for those is.


-- 
Configure bugmail: https://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