summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/none
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-21 18:30:41 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-03-21 18:30:41 +0000
commit17b28e85c12309d60e3c45acb096b9989a7834ff (patch)
treed10a03b425d22b1c48be7356466b0420bfb36402 /content/handlers/javascript/none
parent313dc9b099a172914f312120f0f9d0260a3588cf (diff)
downloadnetsurf-17b28e85c12309d60e3c45acb096b9989a7834ff.tar.gz
netsurf-17b28e85c12309d60e3c45acb096b9989a7834ff.tar.bz2
JS: Split concept of JS context into heap and thread
In preparation for proper splitting of Javascript support into heaps and threads, this renames the types and corrects the no-js builds to still work. At this time no substantive change in semantics exists, and the duktape build won't work. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/handlers/javascript/none')
-rw-r--r--content/handlers/javascript/none/none.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/content/handlers/javascript/none/none.c b/content/handlers/javascript/none/none.c
index 26b9b5300..b79d3242f 100644
--- a/content/handlers/javascript/none/none.c
+++ b/content/handlers/javascript/none/none.c
@@ -35,35 +35,36 @@ void js_finalise(void)
{
}
-nserror js_newcontext(int timeout, jscontext **jsctx)
+nserror js_newheap(int timeout, jsheap **heap)
{
- *jsctx = NULL;
+ *heap = NULL;
return NSERROR_OK;
}
-void js_destroycontext(jscontext *ctx)
+void js_destroyheap(jsheap *heap)
{
}
-jsobject *js_newcompartment(jscontext *ctx, void *win_priv, void *doc_priv)
+nserror js_newthread(jsheap *heap, void *win_priv, void *doc_priv, jsthread **thread)
{
- return NULL;
+ *thread = NULL;
+ return NSERROR_NOT_IMPLEMENTED;
}
-bool js_exec(jscontext *ctx, const uint8_t *txt, size_t txtlen, const char *name)
+bool js_exec(jsthread *thread, const uint8_t *txt, size_t txtlen, const char *name)
{
return true;
}
-bool js_fire_event(jscontext *ctx, const char *type, struct dom_document *doc, struct dom_node *target)
+bool js_fire_event(jsthread *thread, const char *type, struct dom_document *doc, struct dom_node *target)
{
return true;
}
-void js_handle_new_element(jscontext *ctx, struct dom_element *node)
+void js_handle_new_element(jsthread *thread, struct dom_element *node)
{
}
-void js_event_cleanup(jscontext *ctx, struct dom_event *evt)
+void js_event_cleanup(jsthread *thread, struct dom_event *evt)
{
}