Changeset 74983 in webkit
- Timestamp:
- Jan 4, 2011 11:29:19 AM (13 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r74978 r74983 1 2011-01-04 Daniel Bates <dbates@rim.com> 2 3 Reviewed by Adam Roben. 4 5 LEAK: Deallocate instance of ThreadFunctionInvocation if thread creation fails 6 https://bugs.webkit.org/show_bug.cgi?id=51860 7 8 * wtf/ThreadingWin.cpp: 9 (WTF::createThreadInternal): 10 1 11 2011-01-04 Laszlo Gombos <laszlo.1.gombos@nokia.com> 2 12 -
trunk/Source/JavaScriptCore/wtf/ThreadingWin.cpp
r74977 r74983 209 209 unsigned threadIdentifier = 0; 210 210 ThreadIdentifier threadID = 0; 211 ThreadFunctionInvocation* invocation = new ThreadFunctionInvocation(entryPoint, data);211 OwnPtr<ThreadFunctionInvocation> invocation = adoptPtr(new ThreadFunctionInvocation(entryPoint, data)); 212 212 #if OS(WINCE) 213 213 // This is safe on WINCE, since CRT is in the core and innately multithreaded. 214 214 // On desktop Windows, need to use _beginthreadex (not available on WinCE) if using any CRT functions 215 HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation , 0, (LPDWORD)&threadIdentifier);215 HANDLE threadHandle = CreateThread(0, 0, (LPTHREAD_START_ROUTINE)wtfThreadEntryPoint, invocation.get(), 0, (LPDWORD)&threadIdentifier); 216 216 #else 217 HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation , 0, &threadIdentifier));217 HANDLE threadHandle = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, wtfThreadEntryPoint, invocation.get(), 0, &threadIdentifier)); 218 218 #endif 219 219 if (!threadHandle) { … … 227 227 return 0; 228 228 } 229 230 // The thread will take ownership of invocation. 231 invocation.leakPtr(); 229 232 230 233 threadID = static_cast<ThreadIdentifier>(threadIdentifier);
Note: See TracChangeset
for help on using the changeset viewer.