[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
Tue Aug 4 04:57:05 PDT 2009


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





--- Comment #2 from Zoltan Herczeg <zherczeg at inf.u-szeged.hu>  2009-08-04 04:57:04 PDT ---
(In reply to comment #1)
> Created an attachment (id=34058)
 --> (https://bugs.webkit.org/attachment.cgi?id=34058) [details]
> First draft patch

This patch is intended to be a draft. I would like to hear your opinion about
this solution:
  - two new files are added to wtf directory: StaticPtr.h and StaticPtr.cpp
  - enabling FREE_STATIC_PTRS allows to free the pointers in a reversed
creation order
  - Although c++ supports automatic destructors, I think it would not be wise
to free the pointers in random order.
  - StdLibExtras.h is overwritten to support these pointers
  - Since heap.destroy() must be called for JSGlobalData before delete, I
created a new derived class, because template specialization created multiple
definitions for StaticPtr<JSGlobalData>::free() (See JSDOMWindowBase.cpp ->
commonJSGlobalData())
  - I am sure this patch should be cut to multiple parts. Do you have any
suggestions for this?
  - Some destructors are only defined, but never implemented. Why?
(~ImageLoadEventSender(), ~FontCache())
  - And an iteresting observation: some AtomicStrings are defined as const, and
some are not, but all of them seems like fixed strings. Should we change all of
their type to "const AtomicString"?

This patch works with Qt port nicely (after some fixes).

-- 
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