summaryrefslogtreecommitdiffstats
path: root/doc/src/snippets/declarative/integrating-javascript/includejs/script.js
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@nokia.com>2010-12-13 14:02:27 (GMT)
committerThiago Macieira <thiago.macieira@nokia.com>2010-12-13 14:44:19 (GMT)
commitbd9d5c80235ce6d1b005df96c3058b75e82bd6f0 (patch)
tree1467ba66629b21fcdf5dc136e3fefea91a3c6f8f /doc/src/snippets/declarative/integrating-javascript/includejs/script.js
parenta02a747a9d5294127dfe3e676a2759e228257e70 (diff)
downloadQt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.zip
Qt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.tar.gz
Qt-bd9d5c80235ce6d1b005df96c3058b75e82bd6f0.tar.bz2
Add a small protection against releasing a timer twice.
The cell corresponding to an allocated timer ID in the free list is unused (because the ID isn't free). So use it to store an invalid value that we can check against the user's value. This provides some protection against a given timer being released twice. Since we store the serial counter of the nextFreeTimerId, getting the same ID twice is a 1-in-128 chance. Reviewed-By: Bradley T. Hughes
Diffstat (limited to 'doc/src/snippets/declarative/integrating-javascript/includejs/script.js')
0 files changed, 0 insertions, 0 deletions