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

Unified Diff: extensions/renderer/guest_view/guest_view_container.cc

Issue 638703004: Fix mime-handler-view crash upon creation: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/guest_view/guest_view_container.cc
diff --git a/extensions/renderer/guest_view/guest_view_container.cc b/extensions/renderer/guest_view/guest_view_container.cc
index b31ba8d2214b80ee5e1b468718bcde3ba8a95853..781027063a16d8079aa3dc2de2d08a7222e5c59d 100644
--- a/extensions/renderer/guest_view/guest_view_container.cc
+++ b/extensions/renderer/guest_view/guest_view_container.cc
@@ -148,6 +148,12 @@ void GuestViewContainer::OnCreateMimeHandlerViewGuestACK(
void GuestViewContainer::OnGuestAttached(int element_instance_id,
int guest_proxy_routing_id) {
attached_ = true;
+
+ if (!mime_type_.empty()) {
+ // MimeHandlerView's creation and attachment is not done via JS API.
+ return;
+ }
+
// Handle the callback for the current request with a pending response.
HandlePendingResponseCallback(guest_proxy_routing_id);
// Perform the subsequent attach request if one exists.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698