Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a6cfee5

Browse files
author
Esben Sparre Andreasen
committed
JS: prevent inlining of three auxiliary Vue methods
1 parent ddf9ca2 commit a6cfee5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

  • javascript/ql/src/semmle/javascript/frameworks

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ module Vue {
133133
/**
134134
* Gets a node for a member of the `methods` option of this instance.
135135
*/
136+
pragma[noinline]
136137
private DataFlow::Node getAMethod() {
137138
exists(DataFlow::SourceNode methods |
138139
methods.flowsTo(getMethods()) and
@@ -143,6 +144,7 @@ module Vue {
143144
/**
144145
* Gets a node for a member of the `computed` option of this instance that matches `kind` ("get" or "set").
145146
*/
147+
pragma[noinline]
146148
private DataFlow::Node getAnAccessor(string kind) {
147149
exists(DataFlow::SourceNode computedObj, DataFlow::Node accessorObjOrGetter |
148150
computedObj.flowsTo(getComputed()) and
@@ -175,6 +177,7 @@ module Vue {
175177
/**
176178
* Gets the node for the life cycle hook of the `hookName` option of this instance.
177179
*/
180+
pragma[noinline]
178181
private DataFlow::Node getALifecycleHook(string hookName) {
179182
(
180183
hookName = "beforeCreate" or

0 commit comments

Comments
 (0)