[Webkit-unassigned] [Bug 45794] [BREWMP] Don't use new in static initializers
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Sep 15 10:24:46 PDT 2010
https://bugs.webkit.org/show_bug.cgi?id=45794
--- Comment #5 from Kwang Yul Seo <kwangyul.seo at gmail.com> 2010-09-15 10:24:46 PST ---
(In reply to comment #4)
> But the project doesn’t allow global initializers anyway, so this should never come up.
>
> What’s an example of an object where this happens?
Yes, I know WebKit does not use global initializers. However, there are a few places where global initializers are used to count memory leaks. This happens only in Debug build.
For example, in JavaScriptCore/runtime/Structure.cpp
static Mutex& ignoreSetMutex = *(new Mutex);
static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);
static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>);
The above three lines call new in global initializers.
--
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