Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Issue 1425853003: mandoline: Fix ICU initialization. (Closed)

Created:
5 years, 1 month ago by Elliot Glaysher
Modified:
5 years, 1 month ago
Reviewers:
jam, sky
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, penghuang+watch-mandoline_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, tfarina, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

mandoline: Fix ICU initialization. We need to complete the initialization of ICU before we raise the sandbox. That means we can't pass a file descriptor to the ICU data file across mojo pipes. Due to how Android handles resources files, we also can't pass a file descriptor around inside the same process. So pass a raw pointer to a memory mapped file during the sandbox warm-up phase, and make a new option to initialize ICU from this raw pointer. But that just uncovers a bigger issue: we don't always call what was the sandbox warming code. If it's general initialization that needs to be called before we run MojoMain(), we need to include initialization code in most all main.cc implementations. This bakes a base initialize call into the mojo application library. This fixes a crash in the page cycler set, which happens when a page tries to do date operations, which fail because of missing locale data. This should let us raise the sandbox on the page cycler. BUG=546644 Committed: https://crrev.com/e5735ff0a8ddb61672d964a44ebc8a8ebe2b6242 Cr-Commit-Position: refs/heads/master@{#358904}

Patch Set 1 #

Patch Set 2 : Maybe fix analyze / change dependencies #

Patch Set 3 : Patch minimization. #

Patch Set 4 : Redo all initialization across the ecosystem. #

Patch Set 5 : Maybe make gn check work. #

Patch Set 6 : Maybe fix content layer. #

Patch Set 7 : If we were already initialized, return true. #

Patch Set 8 : Maybe fix windows compile. #

Patch Set 9 : Remove most new header inclusions. #

Patch Set 10 : Make it a cc file. #

Patch Set 11 : Patch minimization: part 1 #

Patch Set 12 : Rebase to ToT to fix patch failure, and then include my separate compile fix patch. #

Patch Set 13 : Theoretically fix in process loading. #

Patch Set 14 : Add debug statements to try to see why this fails on bots. #

Patch Set 15 : Add even more logging. #

Patch Set 16 : Rebase to ToT to pick up fixes on trunk. #

Patch Set 17 : Merge with ToT #

Patch Set 18 : Always open a new platform file to pass to the init_function #

Patch Set 19 : Maybe fix mac compile. #

Patch Set 20 : Reenable the sandbox. #

Patch Set 21 : Revert my change that removed multiple initialization checks. #

Patch Set 22 : Fix bad merge #

Patch Set 23 : Rebase to tot #

Total comments: 2

Patch Set 24 : Don't initialize ICU again in the shell. #

Total comments: 1

Patch Set 25 : Merge tot #

Patch Set 26 : Exploratory revert which will break Windows, but wich also will have no compile differences to linu… #

Patch Set 27 : Try to add debugging statements that will show up in the android logs. #

Patch Set 28 : Add more debug logging to test another hypothesis. #

Patch Set 29 : Pass raw icu memory around. #

Patch Set 30 : Move newly android only code to defined(OS_ANDROID) #

Patch Set 31 : Rebase to to #

Unified diffs Side-by-side diffs Delta from patch set Stats (+139 lines, -120 lines) Patch
M base/i18n/icu_util.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +23 lines, -2 lines 0 comments Download
M base/i18n/icu_util.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 2 chunks +23 lines, -0 lines 0 comments Download
M components/html_viewer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +0 lines, -2 lines 0 comments Download
M components/html_viewer/global_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +3 lines, -7 lines 0 comments Download
M components/html_viewer/html_viewer_main.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -26 lines 0 comments Download
M components/resource_provider/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +0 lines, -6 lines 0 comments Download
M components/resource_provider/public/cpp/resource_loader.h View 2 chunks +0 lines, -3 lines 0 comments Download
M components/resource_provider/public/cpp/resource_loader.cc View 2 chunks +0 lines, -13 lines 0 comments Download
M components/resource_provider/public/interfaces/resource_provider.mojom View 1 chunk +0 lines, -3 lines 0 comments Download
M components/resource_provider/resource_provider_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M components/resource_provider/resource_provider_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +0 lines, -10 lines 0 comments Download
M mandoline/app/desktop/launcher_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M mandoline/services/core_services/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -5 lines 0 comments Download
M mandoline/services/core_services/main.cc View 1 2 3 4 5 6 7 8 9 1 chunk +0 lines, -26 lines 0 comments Download
M mojo/application/public/cpp/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
A mojo/application/public/cpp/initialize_base_and_icu.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +43 lines, -0 lines 0 comments Download
M mojo/runner/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 3 chunks +7 lines, -1 line 0 comments Download
M mojo/runner/child_process.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 3 chunks +6 lines, -9 lines 0 comments Download
M mojo/runner/context.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 2 chunks +5 lines, -0 lines 0 comments Download
M mojo/runner/in_process_native_runner.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M mojo/runner/init.h View 1 2 3 2 chunks +6 lines, -0 lines 0 comments Download
M mojo/runner/init.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +19 lines, -0 lines 0 comments Download
M ui/views/mus/aura_init.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 44 (17 generated)
Elliot Glaysher
This fixes the page cycler with multiprocess and the sandbox on.
5 years, 1 month ago (2015-10-29 20:20:41 UTC) #2
Elliot Glaysher
(Hold off on this temporarily; we aren't calling init in all the places we should ...
5 years, 1 month ago (2015-10-29 21:04:04 UTC) #3
jam
It seems for the time being all of our apps use base, and it would ...
5 years, 1 month ago (2015-10-30 00:53:09 UTC) #6
Elliot Glaysher
ptal Is there a cross platform way to duplicate a base::PlatformFile? If so, this patch ...
5 years, 1 month ago (2015-11-04 20:43:19 UTC) #7
Elliot Glaysher
ping sky
5 years, 1 month ago (2015-11-05 00:09:58 UTC) #8
sky
On 2015/11/05 00:09:58, Elliot Glaysher wrote: > ping sky Sorry, I thought John was reviewing. ...
5 years, 1 month ago (2015-11-05 03:32:14 UTC) #9
sky
I'm LGTMing. I would prefer if this was optional. https://codereview.chromium.org/1425853003/diff/430001/base/i18n/icu_util.h File base/i18n/icu_util.h (right): https://codereview.chromium.org/1425853003/diff/430001/base/i18n/icu_util.h#newcode23 base/i18n/icu_util.h:23: ...
5 years, 1 month ago (2015-11-05 03:40:17 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/450001
5 years, 1 month ago (2015-11-05 18:42:01 UTC) #12
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 1 month ago (2015-11-05 18:42:04 UTC) #14
sky
LGTM !
5 years, 1 month ago (2015-11-05 18:43:54 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/450001
5 years, 1 month ago (2015-11-05 18:45:10 UTC) #18
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/115947)
5 years, 1 month ago (2015-11-05 18:56:36 UTC) #20
Elliot Glaysher
ping jam for base owners review
5 years, 1 month ago (2015-11-05 19:22:29 UTC) #21
jam
lgtm https://codereview.chromium.org/1425853003/diff/450001/base/i18n/icu_util.h File base/i18n/icu_util.h (right): https://codereview.chromium.org/1425853003/diff/450001/base/i18n/icu_util.h#newcode23 base/i18n/icu_util.h:23: BASE_I18N_EXPORT PlatformFile OpenIcuDataFile(); nit: ICU for consistency with ...
5 years, 1 month ago (2015-11-05 19:29:03 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/450001
5 years, 1 month ago (2015-11-05 20:00:46 UTC) #24
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_android_rel_ng/builds/92065)
5 years, 1 month ago (2015-11-06 00:07:57 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/450001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/450001
5 years, 1 month ago (2015-11-06 18:15:54 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/116356)
5 years, 1 month ago (2015-11-06 18:21:46 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/470001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/470001
5 years, 1 month ago (2015-11-06 18:42:26 UTC) #33
Elliot Glaysher
sky: this is a big enough change that you should probably rereview parts of this ...
5 years, 1 month ago (2015-11-09 22:43:13 UTC) #35
sky
SLGTM - I'm not a base owner, so I didn't look there.
5 years, 1 month ago (2015-11-10 00:53:50 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1425853003/570001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1425853003/570001
5 years, 1 month ago (2015-11-10 18:15:56 UTC) #39
commit-bot: I haz the power
Committed patchset #31 (id:570001)
5 years, 1 month ago (2015-11-10 21:23:07 UTC) #40
commit-bot: I haz the power
Patchset 31 (id:??) landed as https://crrev.com/e5735ff0a8ddb61672d964a44ebc8a8ebe2b6242 Cr-Commit-Position: refs/heads/master@{#358904}
5 years, 1 month ago (2015-11-10 21:24:20 UTC) #41
msw
On 2015/11/10 21:24:20, commit-bot: I haz the power wrote: > Patchset 31 (id:??) landed as ...
5 years, 1 month ago (2015-11-10 22:54:07 UTC) #42
msw
On 2015/11/10 22:54:07, msw wrote: > On 2015/11/10 21:24:20, commit-bot: I haz the power wrote: ...
5 years, 1 month ago (2015-11-10 23:27:35 UTC) #43
Elliot Glaysher
5 years, 1 month ago (2015-11-10 23:35:02 UTC) #44
Message was sent while issue was closed.
A revert of this CL (patchset #31 id:570001) has been created in
https://codereview.chromium.org/1429263005/ by erg@chromium.org.

The reason for reverting is: Failures on Chromium Mojo Linux Perf which appears
to be because the perf bots don't have an up to date kernel and on Chromium Mojo
Android which has some weird crash..

Powered by Google App Engine
This is Rietveld 408576698