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

Unified Diff: chrome/browser/android/tab_android.cc

Issue 2313133002: Fix crashers and issues when rendering blimp in tabs (Closed)
Patch Set: Created 4 years, 3 months 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 | « blimp/client/core/render_widget/render_widget_feature.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/tab_android.cc
diff --git a/chrome/browser/android/tab_android.cc b/chrome/browser/android/tab_android.cc
index a9c12960053437ff7c19302988e2ed59f301272b..759b97da6e3616a6b52fedb486cebb08e01923d1 100644
--- a/chrome/browser/android/tab_android.cc
+++ b/chrome/browser/android/tab_android.cc
@@ -434,7 +434,10 @@ base::android::ScopedJavaLocalRef<jobject> TabAndroid::InitBlimpContents(
ui::WindowAndroid* window =
reinterpret_cast<ui::WindowAndroid*>(window_android_ptr);
blimp_contents_ = context->CreateBlimpContents(window);
- DCHECK(blimp_contents_);
+ // If creating a BlimpContents failed, fall back to WebContents-based by
+ // doing an early out here.
+ if (!blimp_contents_)
+ return nullptr;
// Let's detach the layer from WebContents first, just to be sure.
if (web_contents_ && web_contents_->GetNativeView() &&
« no previous file with comments | « blimp/client/core/render_widget/render_widget_feature.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698