Bug 1663452, steal structured clone data for pushState, r=peterv

Differential Revision: https://phabricator.services.mozilla.com/D89903
This commit is contained in:
Olli Pettay 2020-09-11 11:51:57 +00:00
parent 60725c5763
commit 9fe5fa2214

View File

@ -1337,9 +1337,9 @@ bool IPDLParamTraits<dom::SessionHistoryInfo>::Read(
if (stateData.isSome()) {
aResult->mStateData = new nsStructuredCloneContainer();
if (aActor->GetSide() == ChildSide) {
UnpackClonedMessageDataForChild(stateData.ref(), *aResult->mStateData);
aResult->mStateData->StealFromClonedMessageDataForChild(stateData.ref());
} else {
UnpackClonedMessageDataForParent(stateData.ref(), *aResult->mStateData);
aResult->mStateData->StealFromClonedMessageDataForParent(stateData.ref());
}
}
MOZ_ASSERT_IF(stateData.isNothing(), !aResult->mStateData);