[Webkit-unassigned] [Bug 20511] Remove static initializers on Windows (StaticConstructors.h)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 25 09:23:20 PDT 2008


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





------- Comment #1 from darin at apple.com  2008-08-25 09:23 PDT -------
(In reply to comment #0)
> Can we not just make these function calls
> (lazy initialized singletons?), or structure with a pointer that is NULL, and
> then gets initialized in the init routines?  I realize this would require
> changing a bunch of accessing code, but I think it is the correct solution.

Sure, we could do something like that. There are two issues:

    1) What would the accessing code look like? Would it be significantly less
elegant?
    2) What would this do to performance? Would the code be measurably slower?

If we tackle both issues, we could certainly change this.

> In the mean time, I have a hacky working solution in MSVC (although, it's less
> hacky then the current code).  The problem is that in order to make it work,
> AVOID_STATIC_CONSTRUCTORS must actually be undefined, which will require either
> fixing the whole system, or leaving it undefined, even when we really are
> avoiding static constructors.

Or we could just change the name to make it clear that what was formerly named
AVOID_STATIC_CONSTRUCTORS is really about a specific technique for doing
avoiding static constructors with GCC. There's nothing sacred about the current
macro name.

I'd love to see a patch that changes the name of the macro for clarity and also
applies your technique for MSVC.


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