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

Unified Diff: chrome/browser/extensions/extension_message_bubble_controller.cc

Issue 2086193002: [Extensions UI] Fix a crash when clicking on a bubble's learn more (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Views clicking Created 4 years, 6 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 | chrome/browser/ui/cocoa/extensions/extension_message_bubble_browsertest_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_message_bubble_controller.cc
diff --git a/chrome/browser/extensions/extension_message_bubble_controller.cc b/chrome/browser/extensions/extension_message_bubble_controller.cc
index e0a769d64526c2335705eda6d35935b4f342d7a9..c9c2af545ba62fcc399c56fc0d4b38cad7bbd779 100644
--- a/chrome/browser/extensions/extension_message_bubble_controller.cc
+++ b/chrome/browser/extensions/extension_message_bubble_controller.cc
@@ -224,6 +224,9 @@ void ExtensionMessageBubbleController::OnLinkClicked() {
user_action_ = ACTION_LEARN_MORE;
delegate_->LogAction(ACTION_LEARN_MORE);
+ // Opening a new tab for the learn more link can cause the bubble to close, so
+ // perform our cleanup here before opening the new tab.
+ OnClose();
if (!g_should_ignore_learn_more_for_testing) {
browser_->OpenURL(
content::OpenURLParams(delegate_->GetLearnMoreUrl(),
@@ -232,7 +235,7 @@ void ExtensionMessageBubbleController::OnLinkClicked() {
ui::PAGE_TRANSITION_LINK,
false));
}
- OnClose();
+ // Warning: |this| may be deleted here!
}
void ExtensionMessageBubbleController::SetIsActiveBubble() {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/extensions/extension_message_bubble_browsertest_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698