Changeset 39672 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jan 6, 2009, 11:24:18 PM (16 years ago)
Author:
[email protected]
Message:

Reviewed by Darin Adler.

https://bugs.webkit.org/show_bug.cgi?id=23142
ThreadGlobalData leaks seen on buildbot

  • wtf/ThreadSpecific.h: (WTF::ThreadSpecific::destroy): Temporarily reset the thread specific value to make getter work on Mac OS X.
  • wtf/Platform.h: Touch this file again to make sure all Windows builds use the most recent version of ThreadSpecific.h.
Location:
trunk/JavaScriptCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r39670 r39672  
     12009-01-06  Alexey Proskuryakov  <[email protected]>
     2
     3        Reviewed by Darin Adler.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=23142
     6        ThreadGlobalData leaks seen on buildbot
     7
     8        * wtf/ThreadSpecific.h: (WTF::ThreadSpecific::destroy): Temporarily reset the thread
     9        specific value to make getter work on Mac OS X.
     10
     11        * wtf/Platform.h: Touch this file again to make sure all Windows builds use the most recent
     12        version of ThreadSpecific.h.
     13
    1142009-01-05  Gavin Barraclough  <[email protected]>
    215
  • trunk/JavaScriptCore/wtf/Platform.h

    r39658 r39672  
    11/*
    2  * Copyright (C) 2006 Apple Inc.  All rights reserved.
     2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc.  All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
  • trunk/JavaScriptCore/wtf/ThreadSpecific.h

    r39604 r39672  
    9898{
    9999    Data* data = static_cast<Data*>(ptr);
     100
     101    // We want get() to keep working while data destructor works, because it can be called indirectly by the destructor.
     102    // Some pthreads implementations zero out the pointer before calling destroy(), so we temporarily reset it.
     103    pthread_setspecific(data->owner->m_key, ptr);
    100104    data->value->~T();
    101105    fastFree(data->value);
    102     // Only reset the pointer after value destructor finishes - otherwise, code in destructor could trigger
    103     // re-creation of the object.
    104106    pthread_setspecific(data->owner->m_key, 0);
    105107    delete data;
Note: See TracChangeset for help on using the changeset viewer.