Open Bug 1877542 Opened 2 years ago

Add a gtest for the "efficient path" in SlicedInputStream::Serialize

Categories

(Core :: XPCOM, task)

task

Tracking

()

People

(Reporter: jstutte, Unassigned)

References

Details

As of bug 1875621 comment 27:

We could probably add one to https://searchfox.org/mozilla-central/rev/2a867dd1ab015c3ef24b774a57709fb3b3dc4961/xpcom/tests/gtest/TestSlicedInputStream.cpp which creates a very large string input stream, slices it with a sliced input stream, and then serializes & de-serializes it, making sure that the stream which was de-serialized can be read asynchronously to produce the expected data.

In terms of serializing/deserializing, you can probably get away with just calling SerializeInputStream (with allowLazy = false) and then deserializing it (https://searchfox.org/mozilla-central/rev/2a867dd1ab015c3ef24b774a57709fb3b3dc4961/ipc/glue/IPCStreamUtils.h#16-37), skipping doing any actual IPC.

You need to log in before you can comment on or make changes to this bug.