Skip to content

Commit 3cc13db

Browse files
committed
NodeJSLib: Restore backwards-compatibility.
1 parent ab2d059 commit 3cc13db

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

javascript/ql/src/semmle/javascript/frameworks/NodeJSLib.qll

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,20 +703,25 @@ module NodeJSLib {
703703
}
704704

705705
/**
706-
* A call to a method from module `vm`
706+
* DEPRECATED Use `VmModuleMemberInvocation` instead.
707+
*/
708+
deprecated class VmModuleMethodCall = VmModuleMemberInvocation;
709+
710+
/**
711+
* An invocation of a member from module `vm`
707712
*/
708713
class VmModuleMemberInvocation extends DataFlow::InvokeNode {
709714
string memberName;
710715

711716
VmModuleMemberInvocation() { this = DataFlow::moduleMember("vm", memberName).getAnInvocation() }
712717

713718
/**
714-
* Gets the code to be executed as part of this call.
719+
* Gets the code to be executed as part of this invocation.
715720
*/
716721
DataFlow::Node getACodeArgument() {
717722
memberName in ["Script", "SourceTextModule", "compileFunction", "runInContext",
718723
"runInNewContext", "runInThisContext"] and
719-
// all of the above methods take the command as their first argument
724+
// all of the above methods/constructors take the command as their first argument
720725
result = getArgument(0)
721726
}
722727
}

0 commit comments

Comments
 (0)