We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cce4db commit f88c213Copy full SHA for f88c213
tools/webidl_binder.py
@@ -629,7 +629,8 @@ def make_call_args(i):
629
if non_pointer:
630
return_prefix += '&'
631
if copy:
632
- pre += ' static %s temp;\n' % type_to_c(return_type, non_pointing=True)
+ # Avoid sharing this static temp var between threads, which could race.
633
+ pre += ' static thread_local %s temp;\n' % type_to_c(return_type, non_pointing=True)
634
return_prefix += '(temp = '
635
return_postfix += ', &temp)'
636
0 commit comments