forked from mirrors/gecko-dev
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:
parent
e58b9d039a
commit
0e51bbe007
1 changed files with 14 additions and 19 deletions
|
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue