Ignore:
Timestamp:
Nov 14, 2008, 5:29:33 PM (17 years ago)
Author:
[email protected]
Message:

Reviewed by Darin Alder.

https://bugs.webkit.org/show_bug.cgi?id=21810
Remove use of static C++ objects that are destroyed at exit time (destructors)

Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid
exit-time destructor. Update code that was changed to fix this issue that ran
into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference
in gcc build 5465). Also typdefs for template types needed to be added in some
cases so the type could make it through the macro successfully.

Basically code of the form:
static T m;
becomes:
DEFINE_STATIC_LOCAL(T, m, ());

Also any code of the form:
static T& m = *new T;
also becomes:
DEFINE_STATIC_LOCAL(T, m, ());

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r38316 r38411  
    308308                E1EE793D0D6C9B9200FEA3BA /* ThreadingPthreads.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EE793C0D6C9B9200FEA3BA /* ThreadingPthreads.cpp */; };
    309309                E1EF79AA0CE97BA60088D500 /* UTF8.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EF79A80CE97BA60088D500 /* UTF8.cpp */; };
     310                FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
    310311/* End PBXBuildFile section */
    311312
     
    747748                F692A8860255597D01FF60F7 /* UString.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = UString.h; sourceTree = "<group>"; tabWidth = 8; };
    748749                F692A8870255597D01FF60F7 /* JSValue.cpp */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSValue.cpp; sourceTree = "<group>"; tabWidth = 8; };
     750                FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StdLibExtras.h; sourceTree = "<group>"; };
    749751/* End PBXFileReference section */
    750752
     
    10561058                                148A1ECD0D10C23B0069A47C /* RefPtrHashMap.h */,
    10571059                                51F648D60BB4E2CA0033D760 /* RetainPtr.h */,
     1060                                FE1B44790ECCD73B004F4DD1 /* StdLibExtras.h */,
    10581061                                E11D51750B2E798D0056C188 /* StringExtras.h */,
    10591062                                5DA479650CFBCF56009328A0 /* TCPackedCache.h */,
     
    15751578                                7EFF00640EC05A9A00AA7C93 /* NodeInfo.h in Headers */,
    15761579                                7E4C89140ECA0F9A00DBEEEC /* EvalCodeCache.h in Headers */,
     1580                                FE1B447A0ECCD73B004F4DD1 /* StdLibExtras.h in Headers */,
    15771581                        );
    15781582                        runOnlyForDeploymentPostprocessing = 0;
Note: See TracChangeset for help on using the changeset viewer.