content: Make QuotaExceededError serializable (#38720)

Implements (de)serialization behavior for QuotaExceededError and enables
the annotation on the WebIDL spec.

Testing: Adds its own WPT tests
Fixes: https://github.com/servo/servo/issues/38685

---------

Signed-off-by: Rahul Menon <menonrahul02@gmail.com>
This commit is contained in:
Rahul Menon 2025-08-16 15:33:37 -05:00 committed by GitHub
parent e80d36783a
commit 389277fa72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 149 additions and 7 deletions

View file

@ -12,6 +12,7 @@ use std::collections::HashMap;
use base::id::{
BlobId, DomExceptionId, DomPointId, ImageBitmapId, MessagePortId, OffscreenCanvasId,
QuotaExceededErrorId,
};
use log::warn;
use malloc_size_of_derive::MallocSizeOf;
@ -32,6 +33,9 @@ pub struct StructuredSerializedData {
pub points: Option<HashMap<DomPointId, DomPoint>>,
/// Serialized exception objects.
pub exceptions: Option<HashMap<DomExceptionId, DomException>>,
/// Serialized quota exceeded errors.
pub quota_exceeded_errors:
Option<HashMap<QuotaExceededErrorId, SerializableQuotaExceededError>>,
/// Transferred objects.
pub ports: Option<HashMap<MessagePortId, MessagePortImpl>>,
/// Transform streams transferred objects.