forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix
deleted val
problem caused by move assignment to itself (emscri…
…pten-core#20072) The implementation of `val& operator=(val&& v)` should not directly call `_emval_decref(handle)`. According to the semantics of move & assignment, the input argument(v) need to be reset first, and then the internal handle is judged to be a valid handle before calling `_emval_decref`. This avoids the loss of reference problem that occurs when moving the assignment to itself (this).
- Loading branch information
Showing
3 changed files
with
17 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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