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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java

Issue 2556253006: Fix disk read violation when create GvrLayout (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
index d391c762ba044d380f410f36ddd759b7c169cc92..a247b1f56d7fdb8d73dd3fa1e6ec46b60054e967 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrShellDelegate.java
@@ -409,6 +409,7 @@ public class VrShellDelegate {
private long createNonPresentingNativeContext() {
if (mVrClassesBuilder == null) return 0;
mNonPresentingGvrContext = mVrClassesBuilder.createNonPresentingGvrContext();
+ if (mNonPresentingGvrContext == null) return 0;
return mNonPresentingGvrContext.getNativeGvrContext();
}
@@ -472,11 +473,8 @@ public class VrShellDelegate {
private boolean createVrShell() {
if (mVrClassesBuilder == null) return false;
- StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskReads();
- StrictMode.allowThreadDiskWrites();
mVrShell = mVrClassesBuilder.createVrShell();
- StrictMode.setThreadPolicy(oldPolicy);
- return true;
+ return mVrShell != null;
}
private void addVrViews() {
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/vr_shell/VrClassesBuilderImpl.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698