Ignore:
Timestamp:
Oct 29, 2008, 8:38:55 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-10-29 Steve Falkenburg <[email protected]>

<rdar://problem/6326563> Crash on launch

For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex.


Exporting data from a DLL on Windows requires specifying declspec(dllimport) in the header used by
callers, but
declspec(dllexport) when defined in the DLL implementation. By instead exporting
the explicit lock/unlock functions, we can avoid this.


Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function.


Reviewed by Darin Adler.

  • wtf/Threading.h: (WTF::lockAtomicallyInitializedStaticMutex): (WTF::unlockAtomicallyInitializedStaticMutex):
  • wtf/ThreadingWin.cpp: (WTF::lockAtomicallyInitializedStaticMutex): (WTF::unlockAtomicallyInitializedStaticMutex):

WebKit/win:

2008-10-29 Steve Falkenburg <[email protected]>

<rdar://problem/6326563> Crash on launch


For Windows, export explicit functions rather than exporting data for atomicallyInitializedStaticMutex.


Exporting data from a DLL on Windows requires specifying declspec(dllimport) in the header used by
callers, but
declspec(dllexport) when defined in the DLL implementation. By instead exporting
the explicit lock/unlock functions, we can avoid this.


Fixes a crash on launch, since we were previously erroneously exporting atomicallyInitializedStaticMutex as a function.


Reviewed by Darin Adler.

  • WebKit.vcproj/WebKit.def:
  • WebKit.vcproj/WebKit_debug.def:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/ThreadingWin.cpp

    r37364 r37990  
    108108}
    109109
    110 Mutex* atomicallyInitializedStaticMutex;
     110static Mutex* atomicallyInitializedStaticMutex;
     111
     112void lockAtomicallyInitializedStaticMutex()
     113{
     114    atomicallyInitializedStaticMutex->lock();
     115}
     116
     117void unlockAtomicallyInitializedStaticMutex()
     118{
     119    atomicallyInitializedStaticMutex->unlock();
     120}
    111121
    112122static ThreadIdentifier mainThreadIdentifier;
Note: See TracChangeset for help on using the changeset viewer.