Bug 236222

Summary: [WTF] Retrieve the main thread ID from TEB in Windows
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: New BugsAssignee: Yusuke Suzuki <ysuzuki>
Status: NEW ---    
Severity: Normal CC: ap, benjamin, bfulgham, cdumez, cmarcelo, don.olmstead, ews-watchlist, Hironori.Fujii, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch ews-feeder: commit-queue-

Description Yusuke Suzuki 2022-02-07 01:42:24 PST
[WTF] Retrieve the main thread ID from TEB in Windows
Comment 1 Yusuke Suzuki 2022-02-07 01:42:49 PST
Created attachment 451070 [details]
Patch
Comment 2 Alexey Proskuryakov 2022-02-07 12:31:50 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

> Source/WTF/wtf/win/MainThreadWin.cpp:42
> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block

Makes me wonder if it is teb or tib.
Comment 3 Yusuke Suzuki 2022-02-07 23:40:08 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

>> Source/WTF/wtf/win/MainThreadWin.cpp:42
>> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
> 
> Makes me wonder if it is teb or tib.

It is referring to the same thing, but TIB in Windows 9x and TEB in Windows NT~.
So, TEB :)
Comment 4 Yusuke Suzuki 2022-02-07 23:40:52 PST
Comment on attachment 451070 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=451070&action=review

>>> Source/WTF/wtf/win/MainThreadWin.cpp:42
>>> +    // https://en.wikipedia.org/wiki/Win32_Thread_Information_Block
>> 
>> Makes me wonder if it is teb or tib.
> 
> It is referring to the same thing, but TIB in Windows 9x and TEB in Windows NT~.
> So, TEB :)

Ah, precisely, TEB for Win32.
Comment 5 Radar WebKit Bug Importer 2022-02-14 01:43:18 PST
<rdar://problem/88894012>
Comment 6 Brent Fulgham 2023-02-15 14:50:30 PST
@Yusuke: Is this ready to land? Weird that it never committed when everything was green.
Comment 7 Brent Fulgham 2023-02-15 14:51:07 PST
Note: We only really care about Win10+, since older Windows aren't really supported by MS anymore.