Ignore:
Timestamp:
Feb 4, 2009, 12:55:28 AM (16 years ago)
Author:
[email protected]
Message:

Reviewed by Sam Weinig.

https://bugs.webkit.org/show_bug.cgi?id=23681
Worker tests crash in debug builds if run --singly

The crash happened because worker threads continued running while debug-only static objects
were already being destroyed on main thread.

  • runtime/Structure.cpp: Create static debug-only sets in heap, so that they don't get destroyed.
  • wtf/ThreadingPthreads.cpp: Changed assertions to conventional form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Structure.cpp

    r40076 r40608  
    6666
    6767#if ENABLE(JSC_MULTIPLE_THREADS)
    68 static Mutex ignoreSetMutex;
     68static Mutex& ignoreSetMutex = *(new Mutex);
    6969#endif
    7070
    7171static bool shouldIgnoreLeaks;
    72 static HashSet<Structure*> ignoreSet;
     72static HashSet<Structure*>& ignoreSet = *(new HashSet<Structure*>);
    7373#endif
    7474
    7575#if DUMP_STRUCTURE_ID_STATISTICS
    76 static HashSet<Structure*> liveStructureSet;
     76static HashSet<Structure*>& liveStructureSet = *(new HashSet<Structure*>);
    7777#endif
    7878
Note: See TracChangeset for help on using the changeset viewer.