[webkit-reviews] review requested: [Bug 27980] Give an ability to WebKit to free statically allocated pointers before quit : [Attachment 38848] Fifth patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 1 01:22:06 PDT 2009


Zoltan Herczeg <zherczeg at inf.u-szeged.hu> has asked Darin Adler
<darin at apple.com> for review:
Bug 27980: Give an ability to WebKit to free statically allocated pointers
before quit
https://bugs.webkit.org/show_bug.cgi?id=27980

Attachment 38848: Fifth patch
https://bugs.webkit.org/attachment.cgi?id=38848&action=review

------- Additional Comments from Zoltan Herczeg <zherczeg at inf.u-szeged.hu>
Sorry for my long silence, I was away on Holiday. From the start of this week I
am back again and has rewritten most of the core parts of the patch. Global
pointers are changed to structures (these structures are allocated on .bss
(according to objdump). They are simple C structures -> no constructors or
destructors are called (tested by gdb)). Now every structure has an own
separate file ()

The new files are:
   - contains a C struct
 create mode 100644 JavaScriptCore/wtf/GlobalPtr.h
   - contains a C++ class
 create mode 100644 JavaScriptCore/wtf/LocalStaticArrayPtr.h
   - contains a C++ class
 create mode 100644 JavaScriptCore/wtf/LocalStaticPtr.h
   - freeing static variables
 create mode 100644 JavaScriptCore/wtf/StaticPtrBase.cpp
   - contains a C struct
 create mode 100644 JavaScriptCore/wtf/StaticPtrBase.h

There is no inheritance, since a struct is converted to class if inheritance
applied (was strange for me, but it is true). Instead StaticPtrBase must be the
first member of its descendants. The descendants must not contain any virtual
method (to avoid vptr).


More information about the webkit-reviews mailing list