Changeset 217011 in webkit


Ignore:
Timestamp:
May 17, 2017, 4:13:29 PM (8 years ago)
Author:
commit-queue@webkit.org
Message:

[Win] Support $vm.getpid()
https://bugs.webkit.org/show_bug.cgi?id=172248

Patch by Don Olmstead <don.olmstead@am.sony.com> on 2017-05-17
Reviewed by Mark Lam.

  • tools/JSDollarVMPrototype.cpp:

(JSC::functionGetPID):
(JSC::JSDollarVMPrototype::finishCreation):

Location:
trunk/Source/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r217000 r217011  
     12017-05-17  Don Olmstead  <don.olmstead@am.sony.com>
     2
     3        [Win] Support $vm.getpid()
     4        https://bugs.webkit.org/show_bug.cgi?id=172248
     5
     6        Reviewed by Mark Lam.
     7
     8        * tools/JSDollarVMPrototype.cpp:
     9        (JSC::functionGetPID):
     10        (JSC::JSDollarVMPrototype::finishCreation):
     11
    1122017-05-17  Michael Saboff  <msaboff@apple.com>
    213
  • trunk/Source/JavaScriptCore/tools/JSDollarVMPrototype.cpp

    r216218 r217011  
    3636#include "StackVisitor.h"
    3737#include <wtf/DataLog.h>
     38#include <wtf/ProcessID.h>
    3839#include <wtf/StringPrintStream.h>
    3940
     
    439440}
    440441
    441 #if !PLATFORM(WIN)
    442442static EncodedJSValue JSC_HOST_CALL functionGetPID(ExecState*)
    443443{
    444     return JSValue::encode(jsNumber(getpid()));
    445 }
    446 #endif
     444    return JSValue::encode(jsNumber(getCurrentProcessID()));
     445}
    447446
    448447void JSDollarVMPrototype::finishCreation(VM& vm, JSGlobalObject* globalObject)
     
    470469
    471470    addFunction(vm, globalObject, "value", functionValue, 1);
    472 #if !PLATFORM(WIN)
    473471    addFunction(vm, globalObject, "getpid", functionGetPID, 0);
    474 #endif
    475472}
    476473
Note: See TracChangeset for help on using the changeset viewer.