The old code read the entire file into memory before starting parsing. In
one place it did this with URLPreloader::ReadZip() (for default pref
files), and in another place it did this with
URLPreloader::ReadFile() (for user pref files). It was simplest to leave
that code unchanged.

Nick


On Mon, Mar 12, 2018 at 9:16 PM, David Teller <[email protected]> wrote:

> Out of curiosity, why is the read handled by C++ code?
>
> On 12/03/2018 10:38, Nicholas Nethercote wrote:
> > I don't know. But libpref's file-reading is done by C++ code, which
> passes
> > a string to the Rust code for parsing.
> >
> > Nick
> > _______________________________________________
> > dev-platform mailing list
> > [email protected]
> > https://lists.mozilla.org/listinfo/dev-platform
> >
> _______________________________________________
> dev-platform mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-platform
>
_______________________________________________
dev-platform mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to