Repository navigation
Conversation
Test262 conformance changes
Tested main commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #5689 +/- ##
===========================================
+ Coverage 47.24% 62.44% +15.20%
===========================================
Files 476 538 +62
Lines 46892 59406 +12514
===========================================
+ Hits 22154 37096 +14942
+ Misses 24738 22310 -2428 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request is related to #332. It follows #5618 and adds what that PR left for later:
eval,try_native, and engine features forboa_ffi.It changes the following:
boa_BoaContext_eval. It runs a script and returns aJsValueor aJsError. The error is passed through fromContext::evalas is, which means a syntax error isNativewhilethrow 7andthrow new Error('boom')both come backOpaque.evalchecks that the source is valid UTF-8 before the engine sees it.UTF8Inputdecodes without validating, and an encoded surrogate inside a string literal parsed and ran when I tried it. Invalid source returns a nativeTypeErrorand nothing runs.boa_JsError_try_native, which reads the kind and message out of a thrownErrorobject and needs a context to do it, because reading those properties can run a getter. The result is a newNativeerror and the original is left alone. An error that's alreadyNativeis cloned, backtrace included. When it fails, C gets aJsTryNativeErrorcode with one variant for eachTryNativeErrorvariant. If a getter threw, that exception is dropped.boa_BoaContext_newnow builds the context withIdleJobExecutor. C can't run jobs yet, so a queued promise callback would never run and would only keep whatever it captured alive.evalandtry_nativealso callclear_kept_objectsbefore they return, so aWeakReftarget isn't held alive after the call.ffi/wasmby default. Most of the size isintl_bundled: on my Mac the release dylib is 7.5 MiB without it and 22 MiB with it. I kept it on soIntlworks without extra flags.--no-default-featuresdrops all six (6.5 MiB).tests/c/eval.c, whichrun.shnow runs), and README sections for both functions.boa_engineis untouched. The new defaults enable dependencies already inCargo.lock. The bridge change inffi/boa_ffi/src/lib.rsis ~100 lines out of ~1,100, with the rest mostly tests and the README. I also ran the C tests under ASan and UBSan on Linux and they came back clean.