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

fix(engine): conversion from undefined to JSON #2

Open
wants to merge 1 commit into
base: sam.finch@/context/expose-instruction-count
Choose a base branch
from

Conversation

ryutamago
Copy link
Collaborator

@ryutamago ryutamago commented Mar 6, 2024

Context
Related task

Currently converting undefined to JSON panics, which causes jstz kernel to hang. We should throw a JS error Instead of panicking.
** Test **

To locally test, check out my branch locally, replace the following under the [patch.crates-io] with your local path in Cargo.toml

boa_ast = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_engine = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_gc = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_interner = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_macros = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_parser = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }
boa_profiler = { git = "https://github.com/trilitech/boa.git", branch = "sam.finch@/context/expose-instruction-count" }

Tested that kernel doesn't hang in case undefined is passed to Kv.set
Repl:
Before:
Screenshot 2024-03-06 at 19 58 06
After:
Screenshot 2024-03-06 at 19 51 59

@ryutamago ryutamago changed the base branch from main to sam.finch@/context/expose-instruction-count March 6, 2024 12:34
@ryutamago ryutamago changed the title Engine: fix conversion from undefined to JSON fix(engine): conversion from undefined to JSON Mar 6, 2024
@ryutamago ryutamago marked this pull request as ready for review March 7, 2024 07:02
@johnyob
Copy link
Collaborator

johnyob commented Mar 7, 2024

Lgtm -- would you be able to do a PR on jstz that updates the patches

@johnyob johnyob force-pushed the sam.finch@/context/expose-instruction-count branch 3 times, most recently from 42c4851 to 5ba29ab Compare October 7, 2024 22:03
@johnyob johnyob force-pushed the ryutamago/fix-undefined-to-json branch from 78c8540 to aac8213 Compare October 7, 2024 22:04
@johnyob johnyob force-pushed the sam.finch@/context/expose-instruction-count branch from 5ba29ab to e5f312a Compare October 8, 2024 17:49
@johnyob johnyob force-pushed the ryutamago/fix-undefined-to-json branch from aac8213 to c7b9ff0 Compare October 8, 2024 17:49
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.

2 participants