Repository navigation
fix(ios): audio player use after free - #1334
Merged
Merged
Conversation
WPT non-regression comparisonPASS — no regressions · 0 improved section(s) · overall 3427 → 3427 (0) Unchanged sections (28)
Baseline: Workflow run · this comment is updated on every push. |
SomePersonFromMars
approved these changes
Oct 7, 2026
Collaborator
There was a problem hiding this comment.
It's quite of an interesting fix. It is worth changing the PR description, because it is slightly misleading due to a change in the method used to perform the fix. It is worth emphasising that this PR:
- Removed conditional compilation depending on
__OBJC__, which caused some translation units to believe thataudioPlayer_was a pointer to an ordinary C struct, while others knew that it was actually a__strongpointer to an Objective C object supporting ARC (automatic reference counting). As a result, all translation units now can properly emit calls to the reference counting functions.
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.
Closes #
Introduced changes
AudioPlayer::AudioPlayer) fromIOSAudioPlayer.has when compilingAudioContextit was included and thus a constructor was generated by the compiler (from.cpp) which initializedNativeAudioPlayer *audioPlayer_with a raw pointer without ARC (automatic reference counting) included (as it would have been if it was compilied from.mm.)Checklist