Bug 1176034 - MessagePort should force a close() if the structured clone algorithm fails, r=bent
This commit is contained in:
@@ -238,7 +238,13 @@ PostMessageEvent::FreeTransferStructuredClone(uint32_t aTag,
|
||||
uint64_t aExtraData,
|
||||
void* aClosure)
|
||||
{
|
||||
// Nothing to do.
|
||||
if (aTag == SCTAG_DOM_MAP_MESSAGEPORT) {
|
||||
MOZ_ASSERT(aClosure);
|
||||
MOZ_ASSERT(!aContent);
|
||||
|
||||
StructuredCloneInfo* scInfo = static_cast<StructuredCloneInfo*>(aClosure);
|
||||
MessagePort::ForceClose(scInfo->event->GetPortIdentifier(aExtraData));
|
||||
}
|
||||
}
|
||||
|
||||
PostMessageEvent::PostMessageEvent(nsGlobalWindow* aSource,
|
||||
|
||||
Reference in New Issue
Block a user