Bug 172248 - [Win] Support $vm.getpid()
Summary: [Win] Support $vm.getpid()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Don Olmstead
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-05-17 15:28 PDT by Don Olmstead
Modified: 2017-05-17 16:13 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.91 KB, patch)
2017-05-17 15:37 PDT, Don Olmstead
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Don Olmstead 2017-05-17 15:28:49 PDT
Add Windows implementation of vm.getpid()
Comment 1 Don Olmstead 2017-05-17 15:37:04 PDT
Created attachment 310452 [details]
Patch

The original bug https://bugs.webkit.org/show_bug.cgi?id=163493 did not go for a windows implementation because of restrictions in getpid and _getpid. From MSDN https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps it appears that both _getpid and getpid should just use GetCurrentProcessId so getProcessId from ProcessID.h can be used since it calls that.

Found this while trying to compile out JSCOnly on Windows. It fails on this file because PLATFORM(WIN) is used instead of OS(WINDOWS).
Comment 2 Mark Lam 2017-05-17 15:40:54 PDT
Comment on attachment 310452 [details]
Patch

LGTM.  Did you mean to r? this patch?
Comment 3 Mark Lam 2017-05-17 15:45:12 PDT
Comment on attachment 310452 [details]
Patch

r=me
Comment 4 Don Olmstead 2017-05-17 15:45:46 PDT
(In reply to Mark Lam from comment #3)
> Comment on attachment 310452 [details]
> Patch
> 
> r=me

Thanks for the review!
Comment 5 WebKit Commit Bot 2017-05-17 16:13:32 PDT
Comment on attachment 310452 [details]
Patch

Clearing flags on attachment: 310452

Committed r217011: <http://trac.webkit.org/changeset/217011>
Comment 6 WebKit Commit Bot 2017-05-17 16:13:33 PDT
All reviewed patches have been landed.  Closing bug.