Skip to content

Commit 9d2580f

Browse files
author
Edoardo Pirovano
committed
JS: Fix performance regression of query.
1 parent 9ebeac2 commit 9d2580f

File tree

1 file changed

+5
-5
lines changed
  • javascript/ql/src/semmle/javascript/frameworks

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ module Vue {
139139
*/
140140
pragma[noinline]
141141
private DataFlow::Node getAMethod() {
142-
exists(DataFlow::SourceNode methods |
142+
exists(DataFlow::ObjectLiteralNode methods |
143143
methods.flowsTo(getMethods()) and
144144
result = methods.getAPropertyWrite().getRhs()
145145
)
@@ -150,13 +150,13 @@ module Vue {
150150
*/
151151
pragma[noinline]
152152
private DataFlow::Node getAnAccessor(string kind) {
153-
exists(DataFlow::SourceNode computedObj, DataFlow::Node accessorObjOrGetter |
153+
exists(DataFlow::ObjectLiteralNode computedObj, DataFlow::Node accessorObjOrGetter |
154154
computedObj.flowsTo(getComputed()) and
155155
computedObj.getAPropertyWrite().getRhs() = accessorObjOrGetter
156156
|
157157
result = accessorObjOrGetter and kind = "get"
158158
or
159-
exists(DataFlow::SourceNode accessorObj |
159+
exists(DataFlow::ObjectLiteralNode accessorObj |
160160
accessorObj.flowsTo(accessorObjOrGetter) and
161161
result = accessorObj.getAPropertyWrite(kind).getRhs()
162162
)
@@ -167,13 +167,13 @@ module Vue {
167167
* Gets a node for a member `name` of the `computed` option of this instance that matches `kind` ("get" or "set").
168168
*/
169169
private DataFlow::Node getAccessor(string name, string kind) {
170-
exists(DataFlow::SourceNode computedObj, DataFlow::SourceNode accessorObjOrGetter |
170+
exists(DataFlow::ObjectLiteralNode computedObj, DataFlow::SourceNode accessorObjOrGetter |
171171
computedObj.flowsTo(getComputed()) and
172172
accessorObjOrGetter.flowsTo(computedObj.getAPropertyWrite(name).getRhs())
173173
|
174174
result = accessorObjOrGetter and kind = "get"
175175
or
176-
exists(DataFlow::SourceNode accessorObj |
176+
exists(DataFlow::ObjectLiteralNode accessorObj |
177177
accessorObj.flowsTo(accessorObjOrGetter) and
178178
result = accessorObj.getAPropertyWrite(kind).getRhs()
179179
)

0 commit comments

Comments
 (0)