summaryrefslogtreecommitdiff
path: root/content/handlers
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-06-08 13:33:16 +0100
committerVincent Sanders <vince@kyllikki.org>2019-06-08 13:33:16 +0100
commitdddc5eac944746b766ac1009d2b7063cabab0d3d (patch)
treeaedfa599bc4377fd23ae43aa7dede2b0187f45d9 /content/handlers
parentc74c8332acc3e323565281f3f2774bf088a6a882 (diff)
downloadnetsurf-dddc5eac944746b766ac1009d2b7063cabab0d3d.tar.gz
netsurf-dddc5eac944746b766ac1009d2b7063cabab0d3d.tar.bz2
Update schedulers return codes
The GTK and monkey frontends schedulers now return NSERROR_NOT_FOUND when a caller is using a negative schedule time to remove a callback.
Diffstat (limited to 'content/handlers')
-rw-r--r--content/handlers/javascript/duktape/Window.bnd7
1 files changed, 6 insertions, 1 deletions
diff --git a/content/handlers/javascript/duktape/Window.bnd b/content/handlers/javascript/duktape/Window.bnd
index 865d07421..99615c207 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -167,10 +167,15 @@ static size_t window_alloc_new_callback(duk_context *ctx, window_private_t *wind
static void window_remove_callback_by_handle(duk_context *ctx,
window_private_t *window,
size_t handle) {
+ int res;
+
RING_ITERATE_START(window_schedule_t, window->schedule_ring, sched) {
if (sched->handle == handle) {
NSLOG(dukky, DEEPDEBUG, "Cancelled callback %"PRIsizet, sched->handle);
- guit->misc->schedule(-1, window_schedule_callback, sched);
+ res = guit->misc->schedule(-1,
+ window_schedule_callback,
+ sched);
+ assert(res == NSERROR_OK);
RING_REMOVE(window->schedule_ring, sched);
window_remove_callback_bits(ctx, sched->handle);
free(sched);