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

Route JS errors from UI runtime throught RN's LogBox module #3846

Merged
merged 24 commits into from
Dec 15, 2022

Commits on Dec 2, 2022

  1. Stashing work

    kmagiera committed Dec 2, 2022
    Configuration menu
    Copy the full SHA
    a2f1dd6 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2022

  1. Some updates

    kmagiera committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    c6651db View commit details
    Browse the repository at this point in the history

Commits on Dec 6, 2022

  1. Configuration menu
    Copy the full SHA
    9e1537f View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b8f2105 View commit details
    Browse the repository at this point in the history

Commits on Dec 8, 2022

  1. Moar updates

    kmagiera committed Dec 8, 2022
    Configuration menu
    Copy the full SHA
    8f363cf View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2022

  1. Update plugin.js

    Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
    kmagiera and tomekzaw authored Dec 13, 2022
    Configuration menu
    Copy the full SHA
    71257e3 View commit details
    Browse the repository at this point in the history
  2. Responding to comments

    kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    b346425 View commit details
    Browse the repository at this point in the history
  3. Release 3.0.0-rc.8 (#3819)

    piaskowyk authored and kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    625a3b2 View commit details
    Browse the repository at this point in the history
  4. Fix new implementation iOS crash on reload while animation is running (

    …#3837)
    
    ## Summary
    
    This PR fixes an iOS crash with Hermes on app reload that occurs only if some animation is still running:
    
    <img width="1512" alt="crash" src="https://user-images.githubusercontent.com/20516055/205723759-1ed56999-64e7-4ce6-a4ae-baa686f2b2a4.png">
    
    ## Test plan
    
    1. Build and launch Example app on iOS simulator
    2. Open Animated Style Update Example
    3. Increase duration to 5000 ms
    4. Click "Toggle" button
    5. Press <kbd>r</kbd> in simulator
    6. Make sure the app reloads correctly
    tomekzaw authored and kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    f5405c5 View commit details
    Browse the repository at this point in the history
  5. Use weak object for shareables on V8 (#3839)

    ## Summary
    
    This PR enables weak object implementation for shareables when using V8 runtime.
    
    As @Kudo mentioned in #3722 (comment), react-native-v8 exposes weak objects API via JSI (see [here](https://github.com/Kudo/react-native-v8/blob/96a1a2c8a35349967a3ad7219106a3475b85433a/src/v8runtime/V8Runtime.cpp#L982-L997)).
    
    ## Test plan
    
    Run Example app with react-native-v8 and check if everything works.
    tomekzaw authored and kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    bdd6c7b View commit details
    Browse the repository at this point in the history
  6. [iOS][Layout Animations] Remove exiting views from UIManager's view…

    … registry (#3824)
    
    <!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. -->
    
    ## Summary
    Currently, when views with an `exiting` animation are unmounted, any deleted in that transaction aren't removed from the UIManager's view registry (the mapping of react tags to native views).
    This can cause memory leaks of removed views.
    
    This PR restores the original behaviour of UIManager when removing views, allowing it to clean them up properly, and reattaches the views with `exiting` animations after the transaction removing the views has completed.
    
    <!-- Explain the motivation for this PR. Include "Fixes #<number>" if applicable. -->
    
    ## Test plan
    
    <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. -->
    - In example app, go to "Entering and Exiting with Layout"
    - Set a breakpoint somewhere in `RCTUIManager`, for example `_manageChildren`.
    - Press "Toggle" to create the animated views, and note the number of entries in `_viewRegistry`.
    - Disable the breakpoint, resume the app and start spamming the toggle button.
    - Enable the breakpoint again, and press toggle one more time.
    - The number of entries in `_viewRegistry` should be the same as before spamming toggle.
    jwajgelt authored and kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    2010e5b View commit details
    Browse the repository at this point in the history
  7. Remove _setGloalConsole JSI method (#3853)

    After #3838 we can now access the main global object via `global`
    variable. This eliminates a need for _setGlobalConsole JSI method that
    we'd install in the UI runtime only so that we can set the console
    object as global on the UI runtime. In this PR we change the call to
    _setGlobalConsole with just reassigning global.console.
    
    Add some logs in worklets, run the app, see the logs appear on the
    output, also that console.warn displays in the log box.
    
    Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
    kmagiera and tomekzaw committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    f590030 View commit details
    Browse the repository at this point in the history
  8. Fix bad merge

    kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    595c286 View commit details
    Browse the repository at this point in the history
  9. Responding to comments

    kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    2a772d4 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    04204d5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    29fa80c View commit details
    Browse the repository at this point in the history
  12. Sort out cyclic dependencies

    kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    7e6f035 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    27bb97d View commit details
    Browse the repository at this point in the history
  14. Remove console 🤦

    kmagiera committed Dec 13, 2022
    Configuration menu
    Copy the full SHA
    9137e84 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2022

  1. Configuration menu
    Copy the full SHA
    f63cf7d View commit details
    Browse the repository at this point in the history
  2. Update Common/cpp/SharedItems/Shareables.h

    Co-authored-by: Tomek Zawadzki <tomasz.zawadzki@swmansion.com>
    kmagiera and tomekzaw authored Dec 14, 2022
    Configuration menu
    Copy the full SHA
    9f37efd View commit details
    Browse the repository at this point in the history
  3. Use rt ref

    kmagiera committed Dec 14, 2022
    Configuration menu
    Copy the full SHA
    fbb3110 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    31d6b7b View commit details
    Browse the repository at this point in the history

Commits on Dec 15, 2022

  1. Fix typos

    kmagiera committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    294c26d View commit details
    Browse the repository at this point in the history