|
|
Chromium Code Reviews|
Created:
3 years, 10 months ago by shaobo.yan Modified:
3 years, 9 months ago CC:
chromium-reviews, feature-vr-reviews_chromium.org, agrieve+watch_chromium.org, hokein.wu_gmail.com Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionFix Initializing VrShellImpl can throw a NullPointerException.
When device in portrait mode and daydream setting enable "skip enter
VR", VrShell will crash in initializing process.
This patch fix this issue.
BUG=690625
Patch Set 1 #Patch Set 2 : Fix Initializing VrShellImpl can throw a NullPointerException. #
Total comments: 2
Patch Set 3 : Rebase #Patch Set 4 : Address mthiesse@ comment #
Total comments: 4
Patch Set 5 : Address dtrainor@ address #Patch Set 6 : Rebase #Patch Set 7 : Rebase #Messages
Total messages: 37 (20 generated)
shaobo.yan@intel.com changed reviewers: + mthiesse@chromium.org
mthiesse@ : PTAL. https://codereview.chromium.org/2707803003/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java (right): https://codereview.chromium.org/2707803003/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java:986: public boolean isTabModelNull() { I tried some method like onOrientationChanged or onConfigurationChanged for informing VrShellDelegate whether the View finished initializing after orientation changed. But they are all not what I need. So I created this function. If you have better idea, pls let me know. https://codereview.chromium.org/2707803003/diff/20001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java (right): https://codereview.chromium.org/2707803003/diff/20001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java:239: if (mEnteringVr) { This line is for this situation. Since device received several intent to enter VR, and after enable skipping enter VR, maybeResume wil execute several times. Since enterVR will try several times and then modify mEnteringVr to false, it will cause problem like close VrShell but still got vr mode entered and the orientation is portrait.
shaobo.yan@intel.com changed reviewers: + ddorwin@chromium.org
I think a better solution would be, in ChromeTabbedActivity, to move "mVrShellDelegate.onNativeLibraryReady();" to ChromeTabbedActivity#initializeUI, after initializeCompositorContent. This will ensure that TabModelSelector is always available. Then, in VrShellDelegate, instead of checking for a tabModelSelector, you can check mNativeVrShellDelegate != 0.
On 2017/02/21 15:34:41, mthiesse wrote: > I think a better solution would be, in ChromeTabbedActivity, to move > "mVrShellDelegate.onNativeLibraryReady();" to ChromeTabbedActivity#initializeUI, > after initializeCompositorContent. This will ensure that TabModelSelector is > always available. > > Then, in VrShellDelegate, instead of checking for a tabModelSelector, you can > check mNativeVrShellDelegate != 0. Thx for the comments! Done. PTAL.
lgtm https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java (right): https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java:286: if (mEnteringVr) { No need to check if mEnteringVr is true, just set it to false. https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java:301: if (mNativeVrShellDelegate == 0) { nit: merge this with the if block above, calling prepareToEnterVR() again is basically a noop.
mthiesse@chromium.org changed reviewers: + dtrainor@chromium.org
dtrainor@, please review CTA change.
https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java (right): https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java:635: mVrShellDelegate.onNativeLibraryReady(); Should we rename this to initialize if we're moving it here?
https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... File chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java (right): https://codereview.chromium.org/2707803003/diff/60001/chrome/android/java/src... chrome/android/java/src/org/chromium/chrome/browser/ChromeTabbedActivity.java:635: mVrShellDelegate.onNativeLibraryReady(); On 2017/02/22 06:05:04, David Trainor wrote: > Should we rename this to initialize if we're moving it here? Done.
ping dtrainor@ : PTAL
Sorry for the noise, forget it's weekend...
On 2017/02/26 08:15:14, shaobo.yan wrote: > Sorry for the noise, forget it's weekend...
How do u spell ur name again On Feb 26, 2017 5:47 AM, <elevated1514@gmail.com> wrote: > On 2017/02/26 08:15:14, shaobo.yan wrote: > > Sorry for the noise, forget it's weekend... > > > > https://codereview.chromium.org/2707803003/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Description was changed from ========== Fix Initializing VrShellImpl can throw a NullPointerException. When device in portrait mode and daydream setting enable "skip enter VR", VrShell will crash in initializing process. This patch fix this issue. BUG=690625 ========== to ========== Fix Initializing VrShellImpl can throw a NullPointerException. When device in portrait mode and daydream setting enable "skip enter VR", VrShell will crash in initializing process. This patch fix this issue. BUG=690625 ==========
mthiesse@chromium.org changed reviewers: - elevated1514@gmail.com
lgtm sorry for the delay! am sheriff atm :(.
The CQ bit was checked by shaobo.yan@intel.com
The patchset sent to the CQ was uploaded after l-g-t-m from mthiesse@chromium.org Link to the patchset: https://codereview.chromium.org/2707803003/#ps80001 (title: "Address dtrainor@ address")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by shaobo.yan@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by shaobo.yan@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
The CQ bit was checked by shaobo.yan@intel.com to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)
mthiesse@ : I believe that the latest patch you commit(https://codereview.chromium.org/2727873002/) could fix this issue. If you agree, I'll close this.
On 2017/03/03 05:41:46, shaobo.yan wrote: > mthiesse@ : I believe that the latest patch you > commit(https://codereview.chromium.org/2727873002/) could fix this issue. If you > agree, I'll close this. Yes, I think it does fix the issue. |
