Summary: | Add a $vm.getpid() method. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Mark Lam <mark.lam> | ||||||
Component: | JavaScriptCore | Assignee: | Mark Lam <mark.lam> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | commit-queue, jfbastien, keith_miller, msaboff, saam | ||||||
Priority: | P2 | ||||||||
Version: | WebKit Local Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Mark Lam
2016-10-15 16:20:51 PDT
Created attachment 291730 [details]
proposed patch.
Comment on attachment 291730 [details] proposed patch. View in context: https://bugs.webkit.org/attachment.cgi?id=291730&action=review Test that it returns a non-0 and non-1 integer? > Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp:416 > + return JSValue::encode(JSValue(getpid())); Does that work on Windows? Docs say deprecated, but I don't see why they'd remove it. (In reply to comment #2) > Comment on attachment 291730 [details] > proposed patch. > > View in context: > https://bugs.webkit.org/attachment.cgi?id=291730&action=review > > Test that it returns a non-0 and non-1 integer? I don't think it matters. This is just a debugging tool, and we just want whatever int value getpid() returns. > > Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp:416 > > + return JSValue::encode(JSValue(getpid())); > > Does that work on Windows? Docs say deprecated, but I don't see why they'd > remove it. Good catch. Let me fix. Created attachment 291731 [details]
proposed patch.
(In reply to comment #3) > (In reply to comment #2) > > Comment on attachment 291730 [details] > > proposed patch. > > > > View in context: > > https://bugs.webkit.org/attachment.cgi?id=291730&action=review > > > > Test that it returns a non-0 and non-1 integer? > > I don't think it matters. This is just a debugging tool, and we just want > whatever int value getpid() returns. Yeah but broken debugging is worst debugging. Unlikely to fail given the posix spec, but getting just 0 is really annoying. I don't care much about it, just seems weird, so lgtm either way. Comment on attachment 291731 [details]
proposed patch.
r=me
Comment on attachment 291731 [details] proposed patch. Clearing flags on attachment: 291731 Committed r207387: <http://trac.webkit.org/changeset/207387> All reviewed patches have been landed. Closing bug. |