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

Issue 598363003: Fix CommandLine initialization for Chrome & WebView (Closed)

Created:
6 years, 2 months ago by hjd
Modified:
6 years, 2 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix CommandLine initialization for Chrome & WebView Chrome may access the CommandLine from Java in-between 'load' and 'initialize' which currently causes an crash since JNI is not ready until after initialize but the CommandLine is switched over to native after load (we moved the CommandLine switch to after load to fix a problem in the Webview). This fixes the problem for Chrome by moving the CommandLine switch back to after initialize but provides a method to cause the switch to happen early so the WebView problem can be fixed to. BUG=417053, 331424 Committed: https://crrev.com/6516122e8e02e2d77f1470cb19330f62eeee3521 Cr-Commit-Position: refs/heads/master@{#296924}

Patch Set 1 #

Patch Set 2 : Fix typo #

Total comments: 4

Patch Set 3 : Fix assert sense #

Patch Set 4 : Setup must happen around init #

Patch Set 5 : Fix comments. #

Total comments: 3

Patch Set 6 : Fix test. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -3 lines) Patch
M android_webview/javatests/src/org/chromium/android_webview/test/CommandLineTest.java View 1 2 3 4 5 2 chunks +2 lines, -0 lines 0 comments Download
M base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java View 1 2 3 4 4 chunks +38 lines, -3 lines 0 comments Download

Messages

Total messages: 32 (10 generated)
hjd
ptal
6 years, 2 months ago (2014-09-25 12:04:03 UTC) #2
hjd
ptal
6 years, 2 months ago (2014-09-25 12:37:58 UTC) #5
aberent
https://codereview.chromium.org/598363003/diff/20001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java File base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java (right): https://codereview.chromium.org/598363003/diff/20001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java#newcode252 base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java:252: assert !sLoaded; This looks wrong. Do you really want ...
6 years, 2 months ago (2014-09-25 12:56:10 UTC) #6
hjd
https://codereview.chromium.org/598363003/diff/20001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java File base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java (right): https://codereview.chromium.org/598363003/diff/20001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java#newcode252 base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java:252: assert !sLoaded; On 2014/09/25 12:56:10, aberent wrote: > This ...
6 years, 2 months ago (2014-09-25 13:32:14 UTC) #7
aberent
lgtm
6 years, 2 months ago (2014-09-25 13:38:06 UTC) #8
aberent
On 2014/09/25 13:38:06, aberent wrote: > lgtm That should have been: lgtm once the assert ...
6 years, 2 months ago (2014-09-25 13:38:39 UTC) #9
mkosiba (inactive)
lgtm
6 years, 2 months ago (2014-09-25 14:40:43 UTC) #10
hjd
ptal, if this fixes the crbug.com/417053 feel free to land.
6 years, 2 months ago (2014-09-25 18:14:57 UTC) #12
Feng Qian
https://codereview.chromium.org/598363003/diff/80001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java File base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java (right): https://codereview.chromium.org/598363003/diff/80001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java#newcode243 base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java:243: synchronized (sLock) { "JNI is already loaded by this ...
6 years, 2 months ago (2014-09-25 18:42:39 UTC) #14
hjd_google
https://codereview.chromium.org/598363003/diff/80001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java File base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java (right): https://codereview.chromium.org/598363003/diff/80001/base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java#newcode243 base/android/java/src/org/chromium/base/library_loader/LibraryLoader.java:243: synchronized (sLock) { On 2014/09/25 18:42:38, Feng Qian wrote: ...
6 years, 2 months ago (2014-09-25 18:50:52 UTC) #16
chromium-reviews
This will probably break: https://code.google.com/p/chromium/codesearch#chromium/src/android_webview/javatests/src/org/chromium/android_webview/test/CommandLineTest.java Which will need to updated to call switchCommandLineForWebView / removed ...
6 years, 2 months ago (2014-09-25 19:15:38 UTC) #17
Feng Qian
BTW, we can reproduce the issue by introduce a wait between parts.setContentViewAndLoadLibrary(); postInflationStartup(); My opinion ...
6 years, 2 months ago (2014-09-25 21:22:48 UTC) #18
chromium-reviews
Also, you can now (if you sync today) just build and run Chrome.apk on an ...
6 years, 2 months ago (2014-09-25 21:25:43 UTC) #19
chromium-reviews
Oh, and also it reproduces on KitKat as well, so Chrome on KitKat is all ...
6 years, 2 months ago (2014-09-25 21:27:00 UTC) #20
chromium-reviews
Changes that can reproduce the crash, for your debugging purpose. https://codereview.chromium.org/601423003 https://chrome-internal-review.googlesource.com/177567 On Thu, Sep ...
6 years, 2 months ago (2014-09-25 21:34:45 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/598363003/100001
6 years, 2 months ago (2014-09-26 10:54:58 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/13755)
6 years, 2 months ago (2014-09-26 11:01:58 UTC) #25
hjd
Ross could you ptal at LibraryLoader.java for an OWNERS review? Thanks! :)
6 years, 2 months ago (2014-09-26 11:03:36 UTC) #27
rmcilroy
On 2014/09/26 11:03:36, hjd wrote: > Ross could you ptal at LibraryLoader.java for an OWNERS ...
6 years, 2 months ago (2014-09-26 11:36:33 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/598363003/100001
6 years, 2 months ago (2014-09-26 12:22:42 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:100001) as 6190a213faeb2a2b9e4a9a98776aaf9e85b2b2ee
6 years, 2 months ago (2014-09-26 12:26:50 UTC) #31
commit-bot: I haz the power
6 years, 2 months ago (2014-09-26 12:27:32 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6516122e8e02e2d77f1470cb19330f62eeee3521
Cr-Commit-Position: refs/heads/master@{#296924}

Powered by Google App Engine
This is Rietveld 408576698