pass test-worker-nested-uncaught.js (#19509)

This commit is contained in:
190n
2025-05-12 14:10:18 -07:00
committed by GitHub
parent a2ae0d06b3
commit a182c313e2
13 changed files with 714 additions and 671 deletions

View File

@@ -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