mirror of
https://github.com/hohn/codeql-javascript-multiflow.git
synced 2025-12-16 03:53: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
|
||||
} else {
|
||||
if (ua.safeToWrite()) {
|
||||
|
||||
@@ -1,8 +1,18 @@
|
||||
var SampleUtility = function () {
|
||||
function sus() {
|
||||
var value = this.getParameter('value');
|
||||
|
||||
var ua = new GR('users');
|
||||
ua.query();
|
||||
var ua = new GR('ust');
|
||||
|
||||
if (funnyvar) {
|
||||
nothing()
|
||||
}
|
||||
else {
|
||||
nothing()
|
||||
if (ua.safeToWrite()) {
|
||||
ua.setValue('status', value);
|
||||
ua.update();
|
||||
}
|
||||
}
|
||||
|
||||
if (!ua.hasNext()) {
|
||||
ua.initialize();
|
||||
@@ -11,7 +21,11 @@ var SampleUtility = function () {
|
||||
}
|
||||
else {
|
||||
ua.next();
|
||||
ua.setValue('status', value);
|
||||
ua.update();
|
||||
ua.setValue('status', value);
|
||||
ua.update(); // unsafe
|
||||
if (ua.safeToWrite()) {
|
||||
ua.setValue('status', value); // safe
|
||||
ua.update();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user