File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
javascript/ql/src/semmle/javascript/dataflow Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -879,10 +879,10 @@ module ClassNode {
879879
880880 override FunctionNode getAnInstanceMember ( MemberKind kind ) {
881881 kind = MemberKind:: method ( ) and
882- result = getAPrototypeReference ( ) .getAPropertyWrite ( ) . getRhs ( ) . getALocalSource ( )
882+ result = getAPrototypeReference ( ) .getAPropertySource ( )
883883 or
884884 kind = MemberKind:: method ( ) and
885- result = getConstructor ( ) .getReceiver ( ) .getAPropertyWrite ( ) . getRhs ( ) . getALocalSource ( )
885+ result = getConstructor ( ) .getReceiver ( ) .getAPropertySource ( )
886886 or
887887 exists ( PropertyAccessor accessor |
888888 accessor = getAnAccessor ( kind ) and
@@ -893,7 +893,7 @@ module ClassNode {
893893 override FunctionNode getStaticMethod ( string name ) { result = getAPropertySource ( name ) }
894894
895895 override FunctionNode getAStaticMethod ( ) {
896- result = getAPropertyWrite ( ) . getRhs ( ) . getALocalSource ( )
896+ result = getAPropertySource ( )
897897 }
898898
899899 /**
Original file line number Diff line number Diff line change @@ -155,6 +155,13 @@ class SourceNode extends DataFlow::Node {
155155 result .flowsTo ( getAPropertyWrite ( prop ) .getRhs ( ) )
156156 }
157157
158+ /**
159+ * Gets a source node whose value is stored in a property of this node.
160+ */
161+ DataFlow:: SourceNode getAPropertySource ( ) {
162+ result .flowsTo ( getAPropertyWrite ( ) .getRhs ( ) )
163+ }
164+
158165 /**
159166 * EXPERIMENTAL.
160167 *
You can’t perform that action at this time.
0 commit comments