summaryrefslogtreecommitdiff
path: root/content/handlers/javascript/duktape/dukky.c
Commit message (Collapse)AuthorAgeFilesLines
* use attributes to indicate switch fall through instead of commentsVincent Sanders2024-03-051-1/+1
|
* Avoid integer types with platform dependent sizeDeltaVonNeumann2023-06-171-3/+3
|
* dukky: Fix assignment in assertDaniel Silverstone2020-10-031-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* javascript: Support Canvas to a basic levelDaniel Silverstone2020-05-221-0/+3
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky: Don't allow js_exec on a thread pending destructionDaniel Silverstone2020-04-261-0/+5
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* JS: Add concept of js_closethreadDaniel Silverstone2020-03-221-0/+20
| | | | | | | In order to better model content close vs destroy, add the concept of closing a thread to the JS interface. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Dukky: Make heaps refcounted tooDaniel Silverstone2020-03-221-2/+18
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Dukky: Add refcounting to threadsDaniel Silverstone2020-03-211-5/+59
| | | | | | | | | In order to cope with threads which manage to navigate entirely while executing (sadly possible) we need to handle the possibility that a thread is destroyed by the browser but still needs to live until it returns from whatever exec it was doing at the time. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Dukky: Upgrade dukky binding to support new heap/thread splitDaniel Silverstone2020-03-211-88/+114
| | | | | | | | 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>
* JS: Remove unused slow script callbackDaniel Silverstone2020-03-211-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky: Guard pointless work for deep debugDaniel Silverstone2020-02-231-2/+2
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky_push_event: Enable KeyboardEvent specialisation.Michael Drake2019-12-011-1/+31
|
* dukky: Remove unused `dukky_safe_get()`Daniel Silverstone2019-08-021-6/+0
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky: Clean up our stacktrace reportingDaniel Silverstone2019-08-021-31/+6
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Dukky: Add and utilise a jserrors categoryDaniel Silverstone2019-08-021-4/+4
| | | | | | | Normal, and verbose logging will now also log all JS errors in order that we stand a chance of debugging things more easily when testing. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky.c: Correct typo (BUTTOM -> BUTTON)Daniel Silverstone2019-08-011-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Dukky: Support console logging betterDaniel Silverstone2019-08-011-0/+20
| | | | | | | Add a polyfill for Array.from(), and fix the console formatter so that it won't keep exploding. This should improve matters in the tests. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky: Attempt to make the fallback to HTMLUnknownElement more useful.Daniel Silverstone2019-08-011-4/+7
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* when owning context is destroyed ensure that active js compartment is ↵Vincent Sanders2019-07-121-24/+56
| | | | destroyed first
* Add dodgy window method to clear callbacksDaniel Silverstone2019-05-251-1/+6
| | | | | | | | | Until we can determine *how* the compartment isn't cleaning up properly in the duktape context, this will at least mean we don't get unpleasant callback related issues when compartments are reset during browsing. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Quieten dukky a little more in default log levelsDaniel Silverstone2019-05-061-3/+3
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Support context dump safely in duktapeDaniel Silverstone2019-05-061-2/+21
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* change content get_source_data interfaces to return uint8_t and size_tVincent Sanders2019-05-051-3/+12
| | | | | previously these interfaces returned char * and unsigned int which was undesirable.
* Dukky: Change from specifically named genericsDaniel Silverstone2019-05-051-6/+13
| | | | | | | | Instead of specifically having to extract each generic by name, such as makeListProxy, instead support the entire generics table and use `dukky_push_generics()` to gain access to it. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Force a GC to ensure old compartment goes awayDaniel Silverstone2019-05-051-1/+5
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Replace zd with PRIsizet to appease WindowsDaniel Silverstone2019-05-051-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Support nodelist indexingDaniel Silverstone2019-05-041-1/+35
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Add createElementNSDaniel Silverstone2019-05-041-1/+2
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* JS: Attribute external JS to the URI it came from in backtracesDaniel Silverstone2019-05-041-2/+6
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Support Window as an event target for dukkyDaniel Silverstone2019-05-041-5/+28
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Unref body when finished getting event handlerDaniel Silverstone2019-05-041-0/+4
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Better dukky debug for node creationDaniel Silverstone2019-05-041-1/+12
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Support Document::createEvent()Daniel Silverstone2019-05-031-1/+1
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* Javascript: Support setTimeout and friendsDaniel Silverstone2019-05-031-29/+57
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* dukky: Clean up the logging levels a littleDaniel Silverstone2019-05-021-2/+3
| | | | Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* DUKKY: Remove LOG/JS_LOG macros, update to dukky categoryDaniel Silverstone2019-02-171-49/+49
| | | | | | | Update the logging levels, change to NSLOG across the board, and ensure that we use the `dukky` category now added for us. Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
* fix logging level in duktape bindingVincent Sanders2018-11-061-6/+6
|
* Slightly nicer handling of js_exec() and errorsDaniel Silverstone2018-11-041-19/+47
|
* Use coccinelle to change logging macro calls in c filesVincent Sanders2017-09-061-54/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | for F in $(git ls-files '*.c');do spatch --sp-file foo.cocci --in-place ${F};done @@ expression E; @@ -LOG(E); +NSLOG(netsurf, INFO, E); @@ expression E, E1; @@ -LOG(E, E1); +NSLOG(netsurf, INFO, E, E1); @@ expression E, E1, E2; @@ -LOG(E, E1, E2); +NSLOG(netsurf, INFO, E, E1, E2); @@ expression E, E1, E2, E3; @@ -LOG(E, E1, E2, E3); +NSLOG(netsurf, INFO, E, E1, E2, E3); @@ expression E, E1, E2, E3, E4; @@ -LOG(E, E1, E2, E3, E4); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4); @@ expression E, E1, E2, E3, E4, E5; @@ -LOG(E, E1, E2, E3, E4, E5); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5); @@ expression E, E1, E2, E3, E4, E5, E6; @@ -LOG(E, E1, E2, E3, E4, E5, E6); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6); @@ expression E, E1, E2, E3, E4, E5, E6, E7; @@ -LOG(E, E1, E2, E3, E4, E5, E6, E7); +NSLOG(netsurf, INFO, E, E1, E2, E3, E4, E5, E6, E7);
* Duktape 2.X: duk_error now returns a duk_ret_tMichael Drake2017-03-231-2/+1
| | | | | | https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_error-duk_error_va-duk_throw-duk_fatal-have-a-return-value This also changes Console.bnd to return on error, rather than ignoring it.
* Duktape 2.x: duk_safe_call callbacks now have a void ptr user data param.Michael Drake2017-03-231-5/+5
| | | | https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_safe_call-userdata
* Add EventListener support to duktape binding.Daniel Silverstone2017-02-051-7/+177
| | | | | | | This paves the way for EventTarget and its associated event listener support. In particular it ensures the generic event handling we do supports the semantics of the addEventListener() and removeEventListener() managed lists of callbacks.
* Support fixed nsgenbind bindingsDaniel Silverstone2017-02-051-3/+4
|
* create netsurf inttypes header to have portable integer formatting macrosVincent Sanders2017-01-211-4/+3
|
* Move javascript content handler as appropriate for updated source formatVincent Sanders2016-06-071-0/+1135