Skip to content

Commit

Permalink
errors
Browse files Browse the repository at this point in the history
  • Loading branch information
dylan-conway committed Jul 10, 2024
1 parent 9e357e3 commit 210d864
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/bun.js/bindings/webcore/SerializedScriptValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2574,6 +2574,8 @@ SerializationReturnCode CloneSerializer::serialize(JSValue in)
if (!startMap(inMap))
break;
JSMapIterator* iterator = JSMapIterator::create(m_lexicalGlobalObject, m_lexicalGlobalObject->mapIteratorStructure(), inMap, IterationKind::Entries);
if (UNLIKELY(scope.exception()))
return SerializationReturnCode::ExistingExceptionError;
m_gcBuffer.appendWithCrashOnOverflow(inMap);
m_gcBuffer.appendWithCrashOnOverflow(iterator);
mapIteratorStack.append(iterator);
Expand Down Expand Up @@ -2620,6 +2622,8 @@ SerializationReturnCode CloneSerializer::serialize(JSValue in)
if (!startSet(inSet))
break;
JSSetIterator* iterator = JSSetIterator::create(m_lexicalGlobalObject, m_lexicalGlobalObject->setIteratorStructure(), inSet, IterationKind::Keys);
if (UNLIKELY(scope.exception()))
return SerializationReturnCode::ExistingExceptionError;
m_gcBuffer.appendWithCrashOnOverflow(inSet);
m_gcBuffer.appendWithCrashOnOverflow(iterator);
setIteratorStack.append(iterator);
Expand Down

0 comments on commit 210d864

Please sign in to comment.