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

Unified Diff: extensions/browser/guest_view/guest_view_base.cc

Issue 574023002: GuestView should Self destruct if the embedder doesn't have permission. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch Created 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/guest_view/guest_view_base.cc
diff --git a/extensions/browser/guest_view/guest_view_base.cc b/extensions/browser/guest_view/guest_view_base.cc
index 4a58dd57a1e8d8896a9bbf8c0b39f563ead52c03..696e9935d2e4065b9d8f4336df0eea7440c556f0 100644
--- a/extensions/browser/guest_view/guest_view_base.cc
+++ b/extensions/browser/guest_view/guest_view_base.cc
@@ -140,6 +140,9 @@ void GuestViewBase::Init(const std::string& embedder_extension_id,
embedder_process_id),
embedder_web_contents->GetLastCommittedURL());
if (!availability.is_available()) {
+ // The derived class did not create a WebContents so this class serves no
+ // purpose. Let's self-destruct.
+ delete this;
callback.Run(NULL);
return;
}
« 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