Open GoogleCodeExporter opened 9 years ago
Since PDFium in chrome runs in a sandbox it can't load the ICU data files from
disk. Instead, we'll probably need to add an API to pass in either a file
handle or a mmap'd copy of the data files.
Original comment by jochen@chromium.org
on 4 Aug 2014 at 7:19
I thought this used to work?
Original comment by jam@chromium.org
on 4 Aug 2014 at 4:46
No, this has never worked, and I should have realized that much earlier....
Original comment by eisinger@google.com
on 4 Aug 2014 at 4:56
Yeah, so Android has a similar problem with ICU in Chromium. The result is the
method InitializeICUWithFileDescriptor:
https://code.google.com/p/chromium/codesearch#chromium/src/base/i18n/icu_util.cc
&q=initializeicu&sq=package:chromium&type=cs&l=58
It would be worth looping in Jungshik Shin from the Chromium side, who knows
the ICU initialization code VERY well.
Original comment by andrewha...@chromium.org
on 14 Aug 2014 at 2:52
I believe that now that we support loading V8's initial snapshot from external
files in PDFium, this can be fixed using exactly the same approach as in
https://codereview.chromium.org/705623002/ for the in-renderer process
and
https://codereview.chromium.org/718453003/ for the plugin process
Instead of LoadV8Snapshot() and setting up the V8's startup data, one could add
a new function called LoadICU() which would mmap icudtl.dat. Then
InitializeICU() in base/i18n/icu_util.cc would be modified to only mmap the
file (by calling LoadICU()) if it hasn't done so yet and then do the
initialization.
In this way, when InitializeICU() is called in PDFium, this would just
initialize ICU with the mmap'd file.
Original comment by ba...@chromium.org
on 5 Dec 2014 at 11:49
Original issue reported on code.google.com by
jochen@chromium.org
on 4 Aug 2014 at 7:18Attachments: