Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

James/scale 34 time based global functions kill function execution #127

Conversation

jimmyaxod
Copy link
Contributor

@jimmyaxod jimmyaxod commented Dec 13, 2023

This changes the javascript run() function to be async.
Also implements setTimeout clearTimeout setInterval clearInterval global functions.

NOTE: This work required a couple of changes to quickjs, and so had to pull in quickjs-wasm-sys crate and modify it (Hence the large amount of changes/files).
The changes in quickjs are prefaced with a comment "// Added by loopholelabs". They are:

  • Added JS_DuplicateValue to stop quickjs GC from stealing functions passed to timers.
  • Added helpers for promises JS_GetPromiseResult and JS_GetPromiseState.

Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
…t clearInterval

Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
@jimmyaxod jimmyaxod force-pushed the james/scale-34-time-based-global-functions-kill-function-execution branch from 5ffebb0 to 8ab5c15 Compare December 13, 2023 10:28
github-actions bot and others added 13 commits December 13, 2023 10:38
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
…n-execution' of github.com:loopholelabs/scale into james/scale-34-time-based-global-functions-kill-function-execution
Signed-off-by: Jimmy Moore <jamesmoore@loopholelabs.io>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Signed-off-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
@jimmyaxod jimmyaxod marked this pull request as ready for review December 14, 2023 14:50
@trezy trezy requested a review from dphilla December 19, 2023 14:51
@dphilla dphilla merged commit f0e29d3 into staging Jan 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants