Skip to content

fix(runtime): Do not lose exception in TS extends #1211

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

Merged
merged 4 commits into from
Oct 15, 2019

Conversation

mbektchiev
Copy link
Contributor

  • fix(JSC): Use SuspendExceptionScope instead of clearing exception
  • fix(runtime): Do not call initializer if alloc throws a JS exception
  • Add tests for erroneous TS extends
  • Add tsconfig.json and transpile TypeScriptTests.ts

PR Checklist

What is the current behavior?

Exceptions raised during TS extends call are lost and errors are difficult to detect.

What is the new behavior?

Exceptions raised during TS extends call are correctly thrown in JS and can be processed in a catch block or unhandled exception handler, or crash with a meaningful error.

* fix(JSC): Use `SuspendExceptionScope` instead of clearing exception
* fix(runtime): Do not call initializer if `alloc` throws a JS exception
* Add tests for erroneous TS extends
* Add `tsconfig.json` and transpile `TypeScriptTests.ts`
@mbektchiev mbektchiev added this to the 6.2.0 milestone Oct 14, 2019
@mbektchiev mbektchiev self-assigned this Oct 14, 2019
@cla-bot cla-bot bot added the cla: yes label Oct 14, 2019
@mbektchiev mbektchiev requested a review from darind October 14, 2019 14:10
Memory for the temporary buffer created during marshalling to `functionWithUCharPtr`
was accidentally being left intact on Intel and arm64 architectures, but on
`armv7` it is overwritten, leading to CString test failing to check the actual result.
@mbektchiev mbektchiev force-pushed the bektchiev/dont-lose-exception branch from 4643a5c to b0607f7 Compare October 15, 2019 11:43
This test fails sporadically because GC may have
not finished if the weak reference check is performed
immediately after `__collect` returns. It most frequently
failed on old `armv7` devices but not exclusively on them.
@mbektchiev mbektchiev merged commit 77705a5 into master Oct 15, 2019
@mbektchiev mbektchiev deleted the bektchiev/dont-lose-exception branch October 15, 2019 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants