forked from dop251/goja
-
Notifications
You must be signed in to change notification settings - Fork 22
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
BAAS-19768: update goja to latest March 2023 (part 2) #79
Merged
Conversation
This file contains 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
…ixes dop251#375 (cherry picked from commit a18ffb9) (cherry picked from commit 4d4c8e7)
… than pointers to them. Closes dop251#378. (cherry picked from commit 9037c2b) (cherry picked from commit 3a579a4)
dop251#403. (cherry picked from commit b1618db) (cherry picked from commit 9523bb2)
* Don't clear interrupt until the stack is empty Previous to this the interrupt would be cleared whenever it is noticed before it starts returning the error up the stack. Unfortunately if you have goja code that called go code that called a goja code and it got interrupted. Once we get back in the go code we just got an error, and it's very likely that the code will just return it so it's just an exception. So at that point if there is `try/catch` it will just catch this and the code will not actually be interrupted. It is possible to at each such occurrence test that the error is not InterruptError and Interrupt again, but that seems like the worse of two choices. So instead now the Interrupt will *not* be cleared and if the go code just propagates the error - it will just keep interrupting. But it is still possible to check the error in the go code and decide to clear the interrupt manually. The interrupt will be cleared only once the stack is empty, so there is no way for the above problem. It will also clear the job queue. Otherwise, if there is any promise that has been resolved/rejected, and they aren't cleared they will be executed the next time the Runtime is used, and the stack is empty. * Update runtime.go Co-authored-by: Dmitry Panov <dop251@users.noreply.github.com> Co-authored-by: Dmitry Panov <dop251@users.noreply.github.com> (cherry picked from commit 8795259) (cherry picked from commit 21a34e5)
kpatel71716
approved these changes
Mar 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Given the size, I compared this fork to the goja master branch and focused on differences between vm.go and runtime.go as a sanity check. The other changes seem to be mostly additions or things we pulled in so those look good!
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.
Having this running in evergreen. The failing tests are unrelated to this update and were already happening in
master
.Didn't really have to make changes other than commenting out Promise tests.