Bug 1937694, don't try to keep transferred ports alive for too long, r=mccr8,sfink

Differential Revision: https://phabricator.services.mozilla.com/D232405
This commit is contained in:
Olli Pettay
2025-01-07 20:00:41 +00:00
parent 3ea2cf6b9e
commit db4b61ac4b

View File

@@ -390,6 +390,7 @@ void StructuredCloneHolder::Read(nsIGlobalObject* aGlobal, JSContext* aCx,
mGlobal = aGlobal;
if (!StructuredCloneHolderBase::Read(aCx, aValue, aCloneDataPolicy)) {
mTransferredPorts.Clear();
JS_ClearPendingException(aCx);
aRv.ThrowDataCloneError(mErrorMessage);
return;