[Webkit-unassigned] [Bug 27980] Give an ability to WebKit to free statically allocated pointers before quit

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 26 13:12:24 PDT 2009


Carol Szabo <carol.szabo at nokia.com> changed:

           What    |Removed                     |Added
  Attachment #41886|                            |review?
               Flag|                            |

--- Comment #40 from Carol Szabo <carol.szabo at nokia.com>  2009-10-26 13:12:20 PDT ---
Created an attachment (id=41886)
 --> (https://bugs.webkit.org/attachment.cgi?id=41886)
Proposed Partial Patch

This topic appears to be pretty controversial. It appears that there is not
much value at least for the Mac version of WebKit in making WebKit clean up its
singletons before it being unloaded.
Since a large change appears to be expensive in terms of development and review
time, and risky enough to be found unjustifiable for Apple, I propose this
small safe change, that does not solve the whole problem, but can constitute a
first step towards solving the problem.
My final goal is to have global resources (such as cashes, custom memory
management maps, default stylesheets, etc.) implemented in such a way that
after the last WebKit page, frame, document, script object, worker thread, etc.
has been deleted, these resources can be freed in any order, thus they can be
implemented as global variables, or via global smart pointers, etc. if one
wanted to.
I plan to provide macros for declaring and defining these global resources.
I also plan that by default these macros shall expand to pretty much the same
code as it is now used for the resources such that there is no impact on
In the absence of any other value, this current patch provides:
1. No impact on performance if the user does not redefine the
2. A slightly smaller, more consistent yet more configurable WebKit source code
which benefits future maintainability and usability.

I believe that on the basis of the above benefits alone, my patch should be
accepted, regardless of whether I manage to find a solution to the underlying
problem of singleton cleanup.

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