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

iOS: JavascriptCore Exceptions when finding classes #577

Merged
merged 3 commits into from
Jan 21, 2025

Conversation

hborawski
Copy link
Contributor

@hborawski hborawski commented Jan 16, 2025

When reusing a JSContext that had already loaded JS classes, JavascriptCore would throw exceptions when walking through the dot separated classnames as JSValue can be non-nil with an underlying undefined value. Adding a check for isUndefined lets us short circuit the classname reference recursion and skip back to resource loading.

Change Type (required)

Indicate the type of change your pull request is:

  • patch
  • minor
  • major
  • N/A

Does your PR have any documentation updates?

  • Updated docs
  • No Update needed
  • Unable to update docs
📦 Published PR as canary version: 0.10.2--canary.577.19320

Try this version out locally by upgrading relevant packages to 0.10.2--canary.577.19320

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.76%. Comparing base (cfdf872) to head (9ffe987).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #577   +/-   ##
=======================================
  Coverage   89.75%   89.76%           
=======================================
  Files         331      331           
  Lines       19836    19840    +4     
  Branches     1949     1949           
=======================================
+ Hits        17804    17809    +5     
+ Misses       2018     2017    -1     
  Partials       14       14           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hborawski
Copy link
Contributor Author

/canary

@hborawski hborawski marked this pull request as ready for review January 21, 2025 20:41
@hborawski hborawski changed the title iOS: JavascriptCore Exceptions when reusing JSContext iOS: JavascriptCore Exceptions when finding classses Jan 21, 2025
@hborawski hborawski changed the title iOS: JavascriptCore Exceptions when finding classses iOS: JavascriptCore Exceptions when finding classes Jan 21, 2025
@hborawski hborawski merged commit 2766c6b into main Jan 21, 2025
11 checks passed
@hborawski hborawski deleted the jscore-exceptions-resource-loading branch January 21, 2025 22:34
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