Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WebIDL: Workaround ensureCache in Struct Setters, fix libass#77
Currently the ensureCache create a temporary pointer that will transfer the value to the WASM/C part and recycle it with to use in the next value, but since the libass struct pointers are owned by the library, the pointers can't be recycled or freed or can lead into an undefined behavior. This patch allocate new memory and copy the pointer before set into struct attribute. To avoid creating complex code, I decided to fix it in the webidl binder, but i plan to make a way to mark if the attribute need to copy the pointer.
- Loading branch information