diff options
author | 2023-07-18 04:34:27 -0700 | |
---|---|---|
committer | 2023-07-18 04:35:04 -0700 | |
commit | 777ee4ececebe912a08c1ffe69546aacb6a497c7 (patch) | |
tree | 53a15abae027e3bf5cfdedc70744ce543d7f21f6 /src/bun.js/bindings/ScriptExecutionContext.cpp | |
parent | 661355546a4658ea927bfd70698577c1db301243 (diff) | |
download | bun-777ee4ececebe912a08c1ffe69546aacb6a497c7.tar.gz bun-777ee4ececebe912a08c1ffe69546aacb6a497c7.tar.zst bun-777ee4ececebe912a08c1ffe69546aacb6a497c7.zip |
Fixes #3669
Diffstat (limited to 'src/bun.js/bindings/ScriptExecutionContext.cpp')
-rw-r--r-- | src/bun.js/bindings/ScriptExecutionContext.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/src/bun.js/bindings/ScriptExecutionContext.cpp b/src/bun.js/bindings/ScriptExecutionContext.cpp index b7b7ef16d..f878fd9fb 100644 --- a/src/bun.js/bindings/ScriptExecutionContext.cpp +++ b/src/bun.js/bindings/ScriptExecutionContext.cpp @@ -112,24 +112,15 @@ us_socket_context_t* ScriptExecutionContext::connectedWebSocketKindClientSSL() ScriptExecutionContextIdentifier ScriptExecutionContext::generateIdentifier() { - Locker locker { allScriptExecutionContextsMapLock }; - - // ASSERT(allScriptExecutionContextsMap().contains(m_identifier)); - // allScriptExecutionContextsMap().remove(m_identifier); - return ++lastUniqueIdentifier; } void ScriptExecutionContext::regenerateIdentifier() { - Locker locker { allScriptExecutionContextsMapLock }; - - // ASSERT(allScriptExecutionContextsMap().contains(m_identifier)); - // allScriptExecutionContextsMap().remove(m_identifier); m_identifier = ++lastUniqueIdentifier; - // ASSERT(!allScriptExecutionContextsMap().contains(m_identifier)); + Locker locker { allScriptExecutionContextsMapLock }; allScriptExecutionContextsMap().add(m_identifier, this); } @@ -137,14 +128,14 @@ void ScriptExecutionContext::addToContextsMap() { Locker locker { allScriptExecutionContextsMapLock }; ASSERT(!allScriptExecutionContextsMap().contains(m_identifier)); - // allScriptExecutionContextsMap().add(m_identifier, this); + allScriptExecutionContextsMap().add(m_identifier, this); } void ScriptExecutionContext::removeFromContextsMap() { Locker locker { allScriptExecutionContextsMapLock }; ASSERT(allScriptExecutionContextsMap().contains(m_identifier)); - // allScriptExecutionContextsMap().remove(m_identifier); + allScriptExecutionContextsMap().remove(m_identifier); } ScriptExecutionContext* executionContext(JSC::JSGlobalObject* globalObject) |