mirror of
https://github.com/hohn/codeql-javascript-multiflow.git
synced 2025-12-16 20:03:04 +01:00
wip: illustrate puzzling FP
This commit is contained in:
committed by
=Michael Hohn
parent
f9714d587e
commit
050c3e6243
@@ -32,7 +32,7 @@ SampleUtility.prototype = Object.extendsObject(Processor, {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ua == magicval) {
|
if (ua === magicval) {
|
||||||
1
|
1
|
||||||
} else {
|
} else {
|
||||||
if (ua.safeToWrite()) {
|
if (ua.safeToWrite()) {
|
||||||
|
|||||||
@@ -1,8 +1,18 @@
|
|||||||
var SampleUtility = function () {
|
function sus() {
|
||||||
var value = this.getParameter('value');
|
var value = this.getParameter('value');
|
||||||
|
|
||||||
var ua = new GR('users');
|
var ua = new GR('ust');
|
||||||
ua.query();
|
|
||||||
|
if (funnyvar) {
|
||||||
|
nothing()
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
nothing()
|
||||||
|
if (ua.safeToWrite()) {
|
||||||
|
ua.setValue('status', value);
|
||||||
|
ua.update();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!ua.hasNext()) {
|
if (!ua.hasNext()) {
|
||||||
ua.initialize();
|
ua.initialize();
|
||||||
@@ -12,6 +22,10 @@ var SampleUtility = function () {
|
|||||||
else {
|
else {
|
||||||
ua.next();
|
ua.next();
|
||||||
ua.setValue('status', value);
|
ua.setValue('status', value);
|
||||||
|
ua.update(); // unsafe
|
||||||
|
if (ua.safeToWrite()) {
|
||||||
|
ua.setValue('status', value); // safe
|
||||||
ua.update();
|
ua.update();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user