Changeset 207387 in webkit
- Timestamp:
- Oct 15, 2016 6:44:18 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r207377 r207387 1 2016-10-15 Mark Lam <mark.lam@apple.com> 2 3 Add a $vm.getpid() method. 4 https://bugs.webkit.org/show_bug.cgi?id=163493 5 6 Reviewed by Saam Barati. 7 8 This is especially useful when we need to know the pid of an instance of jsc in 9 the foreground that we're trying to attach a debugger to while the JSC tests are 10 running in the background with a gazillion other jsc processes live at the same 11 time. 12 13 Currently, $vm.getpid() is only supported on non-Windows platforms. 14 According to https://msdn.microsoft.com/en-us/library/ms235372.aspx, getpid() is 15 deprecated. According to https://msdn.microsoft.com/en-us/library/t2y34y40.aspx, 16 _getpid() cannot be used in applications that execute in the Windows Runtime. 17 18 Since this is only a debugging tool and is not a required feature, I'll defer 19 the Windows implementation of this function till the time when someone actually 20 needs it. 21 22 * tools/JSDollarVMPrototype.cpp: 23 (JSC::functionGetPID): 24 (JSC::JSDollarVMPrototype::finishCreation): 25 1 26 2016-10-15 Saam Barati <sbarati@apple.com> 2 27 -
trunk/Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp
r206386 r207387 412 412 } 413 413 414 #if !PLATFORM(WIN) 415 static EncodedJSValue JSC_HOST_CALL functionGetPID(ExecState*) 416 { 417 return JSValue::encode(jsNumber(getpid())); 418 } 419 #endif 420 414 421 void JSDollarVMPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject) 415 422 { … … 435 442 436 443 addFunction(vm, globalObject, "value", functionValue, 1); 444 #if !PLATFORM(WIN) 445 addFunction(vm, globalObject, "getpid", functionGetPID, 0); 446 #endif 437 447 } 438 448
Note: See TracChangeset
for help on using the changeset viewer.