To serialize or deserialize between ScriptValue and SerializedScriptValue, we use
- ScriptValue
- ScriptValueSerializer / ScriptValueDeserializer
- SerializedScriptValue
- SerializedScriptValueReader / SerializedScriptValueWriter
- SerializedScriptValueFactory
and "ForModule" subclasses for most classes.
The relationship between them is too complicated, and they have too many APIs used in other than those classes. For example, we use ScriptValueSerializer::serialize() to serialize a value, and we use SerializedScriptValue::deserialize() to deserialize it. Beside it, their behaviors depend on SerializedScriptValueFactory::m_instance.
I would like to clean them up
- to be clear whether we're using "ForModule" or not
- to use similar interfaces in serialization and deserialization. (e.g. Foo::serialize(value) / Foo::deserialize(serialized))
- to reduce the number of same-named methods for readability, including overloaded methods.
- to have more appropriate class names...
Comment 1 by bugdroid1@chromium.org
, May 26 2016