diff options
author | lazyboy <lazyboy@chromium.org> | 2014-10-07 14:11:46 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-07 21:12:03 +0000 |
commit | b3e7acfa2273ba3c88b988db4e85beb1014ea35f (patch) | |
tree | 0f4107474c1cc9e46b2131486faba773dc8502b3 /extensions/renderer/guest_view | |
parent | b6eaaf28e88c84e21e5d52c1f89ef54bc88661a1 (diff) | |
download | chromium_src-b3e7acfa2273ba3c88b988db4e85beb1014ea35f.zip chromium_src-b3e7acfa2273ba3c88b988db4e85beb1014ea35f.tar.gz chromium_src-b3e7acfa2273ba3c88b988db4e85beb1014ea35f.tar.bz2 |
Fix mime-handler-view crash upon creation:
We don't do create/attach steps through JavaScript API.
This broke after https://crrev.com/e7c9f7781cbc6db099dacbefdc19ac2fd9bfc19a
landed.
BUG=303491
Test=Open chrome with --out-of-process-pdf and --enable-mime-handler-view,
Navigate to a PDF, renderer process shouldn't crash.
Review URL: https://codereview.chromium.org/638703004
Cr-Commit-Position: refs/heads/master@{#298572}
Diffstat (limited to 'extensions/renderer/guest_view')
-rw-r--r-- | extensions/renderer/guest_view/guest_view_container.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/extensions/renderer/guest_view/guest_view_container.cc b/extensions/renderer/guest_view/guest_view_container.cc index b31ba8d..7810270 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. |