Bug 1792524 - [WebDriver BiDi] Add support for serialization and deserialization of generic platform objects. r=webdriver-reviewers,jdescottes

Differential Revision: https://phabricator.services.mozilla.com/D165421
This commit is contained in:
Henrik Skupin 2022-12-23 12:35:34 +00:00
parent e58b9d039a
commit 0e51bbe007

View file

@ -643,11 +643,13 @@ export function serialize(
); );
} }
return serialized;
} else if (ChromeUtils.isDOMObject(value)) {
const serialized = buildSerialized("object", handleId);
return serialized; return serialized;
} }
// TODO: Bug 1770733 and 1792524. Remove the if condition when the serialization of all the other types is implemented,
// since then the serialization of plain objects should be the fallback. // Otherwise serialize the JavaScript object as generic object.
else if (className == "Object") {
const serialized = buildSerialized("object", handleId); const serialized = buildSerialized("object", handleId);
setInternalIdsIfNeeded(serializationInternalMap, serialized, value); setInternalIdsIfNeeded(serializationInternalMap, serialized, value);
@ -661,13 +663,6 @@ export function serialize(
); );
} }
return serialized; return serialized;
}
lazy.logger.warn(
`Unsupported type: ${type} for remote value: ${stringify(value)}`
);
return undefined;
} }
/** /**