-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Fix emrun_file_dump() to work in multithreaded builds. #26698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5754,6 +5754,7 @@ def test_program_arg_separator(self): | |
| self.assertContained('error: unrecognized arguments: --foo', err) | ||
| self.assertContained('remember to add `--` between arguments', err) | ||
|
|
||
| @also_with_threads | ||
| def test_emrun(self): | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC we are not actually running these tests in CI since they got disabled a while back. See #26182 We should certain look into fixing that.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. Tending to that is not urgent from my pov at least. |
||
| self.emcc('test_emrun.c', ['--emrun', '-o', 'test_emrun.html']) | ||
| if not has_browser(): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It you look at
getUnsharedTextDecoderViewI think we can replace this whole expression with just!(data.buffer instanceof ArrayBuffer)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In emrun_file_dump() hypothetically,
datamight be a regular array. Since it is invoked from the JS realm (and not C/C++), existing users might have been calling it by feeding a regular array or a typed array, or a typed array view. The comment hadso I don't want to change that. That is why the check here is conditional.