Remove use of legacy proxy API from library_html5.js. NFC - #20370
Merged
sbc100 merged 1 commit intoOct 3, 2023
Conversation
sbc100
force-pushed
the
remove_use_of_legacy_proxy_api
branch
from
October 2, 2023 19:43
99bae4f to
1cb518d
Compare
tlively
approved these changes
Oct 2, 2023
| static void do_callback(void* arg) { | ||
| callback_args_t* args = (callback_args_t*)arg; | ||
| args->callback(args->event_type, args->event_data, args->user_data); | ||
| free(arg); |
Member
There was a problem hiding this comment.
No need to free since arg is stack allocated.
AFAICT this is the final usage of the legacy proxy API within emscripten.
sbc100
force-pushed
the
remove_use_of_legacy_proxy_api
branch
from
October 2, 2023 23:23
1cb518d to
e58cb95
Compare
stbergmann
added a commit
to stbergmann/emscripten
that referenced
this pull request
Aug 23, 2024
...fixing a regression introduced in c41f659 "Remove use of legacy proxy API from library_html5.js. NFC (emscripten-core#20370)". Fixes: emscripten-core#22442
stbergmann
added a commit
to stbergmann/emscripten
that referenced
this pull request
Sep 3, 2024
...fixing a regression introduced in c41f659 "Remove use of legacy proxy API from library_html5.js. NFC (emscripten-core#20370)". Fixes: emscripten-core#22442
stbergmann
added a commit
to stbergmann/emscripten
that referenced
this pull request
Sep 16, 2024
...fixing a regression introduced in c41f659 "Remove use of legacy proxy API from library_html5.js. NFC (emscripten-core#20370)". Fixes: emscripten-core#22442
stbergmann
added a commit
to allotropia/emscripten
that referenced
this pull request
Sep 18, 2024
...fixing a regression introduced in c41f659 "Remove use of legacy proxy API from library_html5.js. NFC (emscripten-core#20370)". Fixes: emscripten-core#22442 (cherry-picked from 17f1bb7 at <emscripten-core#22443> "Make _emscripten_run_callback_on_thread asynchronous")
sbc100
pushed a commit
that referenced
this pull request
Nov 6, 2024
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
to sbc100/emscripten
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoid an extra malloc per event.
sbc100
added a commit
that referenced
this pull request
Nov 12, 2025
I believe that we started leaking the event data for cross-thread html5 events in #20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoids an extra malloc per event, and cleans up libhtml5.js a little.
inolen
pushed a commit
to inolen/emscripten
that referenced
this pull request
Feb 13, 2026
I believe that we started leaking the event data for cross-thread html5 events in emscripten-core#20370. Prior to that change we use `_emscripten_dispatch_to_thread` which took care of free'ing the event data once it was consumed on the target thread. After this change we copy make copy of the event strut in `_emscripten_run_callback_on_thread` and then free it once the callback is run. This change also avoids an extra malloc per event, and cleans up libhtml5.js a little.
This file contains hidden or 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
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.
AFAICT this is the final usage of the legacy proxy API within emscripten.