-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[wasm][debugger] Correctly handle empty, and whitespace-only strings (#…
…41424) There are two cases being fixed here: 1. str=='', or str=' ' - We check `str_value == 0`, and for the above cases JS returns true, due to type coercion. - So, we show the result as a null string. 2. str==null - debugger.c adds the value for this with `mono_wasm_add_typed_value ("string", NULL, 0)` - the second argument is converted to a string with `Module.UTF8ToString(..)`, but when it's `0`/NULL, we get an empty string. And that becomes a null string, because of (1). Fixing this by using `===` operator to avoid type coercion. Fixes #41276
- Loading branch information
Showing
3 changed files
with
58 additions
and
4 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