RESOLVED FIXED 186017
[WTF] RandomDevice should be initialized inside std::call_once
https://bugs.webkit.org/show_bug.cgi?id=186017
Summary [WTF] RandomDevice should be initialized inside std::call_once
Yusuke Suzuki
Reported 2018-05-27 06:57:24 PDT
[WTF] RandomDevice should be initialized inside std::call_once
Attachments
Patch (1.57 KB, patch)
2018-05-27 06:58 PDT, Yusuke Suzuki
no flags
Patch (1.68 KB, patch)
2018-06-26 19:04 PDT, Yusuke Suzuki
darin: review+
Yusuke Suzuki
Comment 1 2018-05-27 06:58:19 PDT
Alexey Proskuryakov
Comment 2 2018-05-31 11:46:39 PDT
Comment on attachment 341420 [details] Patch Marking r- to get out of review queue, as EWS is all red.
Yusuke Suzuki
Comment 3 2018-06-26 19:04:46 PDT
Don Olmstead
Comment 4 2018-06-28 12:33:03 PDT
Comment on attachment 343674 [details] Patch Informal review is that LGTM. Guessing this is something you're going to be doing across the codebase?
Darin Adler
Comment 5 2018-06-28 14:40:28 PDT
(In reply to Don Olmstead from comment #4) > Guessing this is something you're going to be doing across the codebase? I think only in code that is supposed to be safe for use from multiple threads, which is a small faction of all WebKit code.
Darin Adler
Comment 6 2018-06-28 14:41:33 PDT
Comment on attachment 343674 [details] Patch Since I expect this to come up repeatedly I wonder if there is a cleaner idiom for this. If some way we find we can afford to pay the locking cost on Apple’s platforms it would be nice to be able to quickly remove all of this code.
Darin Adler
Comment 7 2018-06-28 14:53:46 PDT
Maybe the elegant way to do it is to define a different NeverDestroyed variant that automatically includes the once_flag and the laziness and does this all. Then that can be used only on platforms where we turn off the compiler’s built-in locking. On other platforms it can possibly even be a typedef for the plain old NeverDestroyed.
Yusuke Suzuki
Comment 8 2018-07-01 21:17:07 PDT
(In reply to Darin Adler from comment #7) > Maybe the elegant way to do it is to define a different NeverDestroyed > variant that automatically includes the once_flag and the laziness and does > this all. Then that can be used only on platforms where we turn off the > compiler’s built-in locking. On other platforms it can possibly even be a > typedef for the plain old NeverDestroyed. Yeah, that sounds fancy.
Yusuke Suzuki
Comment 9 2018-07-01 21:24:38 PDT
Radar WebKit Bug Importer
Comment 10 2018-07-01 21:25:18 PDT
Note You need to log in before you can comment on or make changes to this bug.