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

embind: Fix method pointers for AOT JS generation. #21168

Merged
merged 1 commit into from Jan 26, 2024

Commits on Jan 26, 2024

  1. embind: Fix method pointers for AOT JS generation.

    Previously, AOT JS glue code for method pointers used the address of the
    method pointer as a unique ID to match JS glue with the binding. However,
    sometimes static initializers malloc different sizes when running
    the AOT generation code versus when the code is run normally. This caused
    the method pointer address to be different and the binding didn't match up.
    
    Instead of using the function pointer or the method pointer address we now
    use a generated signature for the invoker to match up the glue code. This
    works for both types of pointers and also has the advantage that many
    of the glue code functions are nearly identical and can be reusued (closure
    arguments make them behave differently).
    
    Fixes emscripten-core#20994
    brendandahl committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    1daa248 View commit details
    Browse the repository at this point in the history