summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/duktape/Window.bnd
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-21 20:01:38 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-21 20:01:38 +0000
commit3c4652c1c3a2231b2bb1e2bf43e6c16fc54d10bf (patch)
tree2b050331257c08e56880cdaeafa60eea05d97193 /content/handlers/javascript/duktape/Window.bnd
parent66a23c25605c9c7eca7b5c9b420a079ce1203faf (diff)
downloadnetsurf-3c4652c1c3a2231b2bb1e2bf43e6c16fc54d10bf.tar.gz
netsurf-3c4652c1c3a2231b2bb1e2bf43e6c16fc54d10bf.tar.bz2
Dukky: Upgrade dukky binding to support new heap/thread split
Update the duktape bindings and dukky interface to support the new JS heap/thread split. Heaps may have multiple active threads though in general there will only be 2 at a time. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/handlers/javascript/duktape/Window.bnd')
-rw-r--r--content/handlers/javascript/duktape/Window.bnd12
1 files changed, 6 insertions, 6 deletions
diff --git a/content/handlers/javascript/duktape/Window.bnd b/content/handlers/javascript/duktape/Window.bnd
index 44a5170d3..b4a467dfb 100644
--- a/content/handlers/javascript/duktape/Window.bnd
+++ b/content/handlers/javascript/duktape/Window.bnd
@@ -216,8 +216,8 @@ window_remove_callback_by_handle(duk_context *ctx,
} RING_ITERATE_END(window->schedule_ring, sched);
}
-/* This is the dodgy compartment closedown method */
-static duk_ret_t dukky_window_closedown_compartment(duk_context *ctx)
+/* This is the dodgy thread closedown method */
+static duk_ret_t dukky_window_closedown_thread(duk_context *ctx)
{
window_private_t *priv = NULL;
@@ -230,7 +230,7 @@ static duk_ret_t dukky_window_closedown_compartment(duk_context *ctx)
return 0;
}
- NSLOG(dukky, DEEPDEBUG, "Closing down compartment");
+ NSLOG(dukky, DEEPDEBUG, "Closing down thread");
while (priv->schedule_ring != NULL) {
window_remove_callback_by_handle(ctx,
priv,
@@ -361,10 +361,10 @@ prototype Window()
/* ** WebAssembly */
/* As yet, Duktape lacks WA */
#undef EXPOSE
- /* Add s3kr1t method to close the compartment */
+ /* Add s3kr1t method to close the JS thread (browsing context) */
duk_dup(ctx, 0);
- duk_push_string(ctx, MAGIC(closedownCompartment));
- duk_push_c_function(ctx, dukky_window_closedown_compartment, DUK_VARARGS);
+ duk_push_string(ctx, MAGIC(closedownThread));
+ duk_push_c_function(ctx, dukky_window_closedown_thread, DUK_VARARGS);
duk_def_prop(ctx, -3,
DUK_DEFPROP_HAVE_VALUE |
DUK_DEFPROP_HAVE_WRITABLE |