mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 04:49:06 +00:00
pass test-worker-nested-uncaught.js (#19509)
This commit is contained in:
@@ -31,23 +31,12 @@
|
||||
namespace WebCore {
|
||||
namespace Process {
|
||||
|
||||
static std::optional<ProcessIdentifier> globalIdentifier;
|
||||
|
||||
void setIdentifier(ProcessIdentifier processIdentifier)
|
||||
{
|
||||
ASSERT(isUIThread());
|
||||
globalIdentifier = processIdentifier;
|
||||
}
|
||||
// Bun only has 1 process
|
||||
static ProcessIdentifier globalIdentifier { 1 };
|
||||
|
||||
ProcessIdentifier identifier()
|
||||
{
|
||||
static std::once_flag onceFlag;
|
||||
std::call_once(onceFlag, [] {
|
||||
if (!globalIdentifier)
|
||||
globalIdentifier = ProcessIdentifier::generate();
|
||||
});
|
||||
|
||||
return *globalIdentifier;
|
||||
return globalIdentifier;
|
||||
}
|
||||
|
||||
} // namespace ProcessIdent
|
||||
|
||||
Reference in New Issue
Block a user