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

Issue 772983002: Fix a crash on clicking "Load unpacked extension" multiple times (Closed)

Created:
6 years ago by babu
Modified:
6 years ago
Reviewers:
Finnur, Devlin, Evan Stade
CC:
chromium-reviews, chromium-apps-reviews_chromium.org, extensions-reviews_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Fix a crash on clicking "Load unpacked extension" multiple times SelectFile() is getting called more than once for the same window and causing NOTREACHED() failure on linux, since it tries to re-add the observer. To fix the failure, this patch adds a check that does an early-return if the select file dialog is currently being shown to the specified window. BUG=432783 Committed: https://crrev.com/7ec6e063e36a66300570ab0adfd88c2e5acc6bd3 Cr-Commit-Position: refs/heads/master@{#308113}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Addressed review. #

Total comments: 1

Patch Set 3 : Addressed review #

Total comments: 1

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M chrome/browser/ui/webui/extensions/extension_loader_handler.cc View 1 2 3 2 chunks +6 lines, -1 line 0 comments Download

Messages

Total messages: 26 (5 generated)
babu
6 years ago (2014-12-02 20:58:35 UTC) #2
Finnur
Devlin should probably weigh in before I give a green light.
6 years ago (2014-12-03 10:12:49 UTC) #4
Devlin
https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc File chrome/browser/ui/webui/extensions/extension_loader_handler.cc (right): https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc#newcode102 chrome/browser/ui/webui/extensions/extension_loader_handler.cc:102: load_extension_dialog_ = ui::SelectFileDialog::Create( hmm... I have a slight concern ...
6 years ago (2014-12-03 17:47:55 UTC) #5
Devlin
https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc File chrome/browser/ui/webui/extensions/extension_loader_handler.cc (right): https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc#newcode102 chrome/browser/ui/webui/extensions/extension_loader_handler.cc:102: load_extension_dialog_ = ui::SelectFileDialog::Create( On 2014/12/03 17:47:55, Devlin wrote: > ...
6 years ago (2014-12-03 17:59:01 UTC) #6
babu
On 2014/12/03 17:47:55, Devlin wrote: > https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc > File chrome/browser/ui/webui/extensions/extension_loader_handler.cc (right): > > https://codereview.chromium.org/772983002/diff/1/chrome/browser/ui/webui/extensions/extension_loader_handler.cc#newcode102 > ...
6 years ago (2014-12-03 23:10:09 UTC) #7
Devlin
On 2014/12/03 23:10:09, babu wrote: > My understanding was that reassigning |load_extension_dialog_| will always > ...
6 years ago (2014-12-03 23:26:39 UTC) #8
babu
On 2014/12/03 23:26:39, Devlin wrote: > Right, it does on linux because the only reference ...
6 years ago (2014-12-04 17:24:03 UTC) #9
babu
On 2014/12/04 17:24:03, babu wrote: > On 2014/12/03 23:26:39, Devlin wrote: > > Right, it ...
6 years ago (2014-12-04 17:28:56 UTC) #10
Devlin
I agree; I think the right solution is an early return.
6 years ago (2014-12-04 17:31:48 UTC) #11
babu
+estade@ for owner review.
6 years ago (2014-12-04 19:54:11 UTC) #13
Devlin
https://codereview.chromium.org/772983002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc File chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc (right): https://codereview.chromium.org/772983002/diff/20001/chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc#newcode233 chrome/browser/ui/libgtk2ui/select_file_dialog_impl_gtk2.cc:233: return; This isn't what I was referring to. I ...
6 years ago (2014-12-04 20:00:14 UTC) #14
babu
Devlin, PTAL. Thanks for your help.
6 years ago (2014-12-04 21:01:21 UTC) #15
Devlin
This looks much better. :) https://codereview.chromium.org/772983002/diff/40001/chrome/browser/ui/webui/extensions/extension_loader_handler.cc File chrome/browser/ui/webui/extensions/extension_loader_handler.cc (right): https://codereview.chromium.org/772983002/diff/40001/chrome/browser/ui/webui/extensions/extension_loader_handler.cc#newcode110 chrome/browser/ui/webui/extensions/extension_loader_handler.cc:110: LOG(ERROR) << "Select file ...
6 years ago (2014-12-04 21:39:10 UTC) #16
babu
On 2014/12/04 21:39:10, Devlin wrote: > This looks much better. :) > > https://codereview.chromium.org/772983002/diff/40001/chrome/browser/ui/webui/extensions/extension_loader_handler.cc > ...
6 years ago (2014-12-04 22:06:05 UTC) #17
Devlin
lgtm (note you'll still need an OWNERS approval)
6 years ago (2014-12-04 22:16:26 UTC) #18
babu
Finnur, could you please have a look?
6 years ago (2014-12-12 13:41:49 UTC) #20
Finnur
LGTM (sorry, didn't see Devlin's hint about an OWNER; didn't actually even realize he isn't ...
6 years ago (2014-12-12 14:34:04 UTC) #21
babu
On 2014/12/12 14:34:04, Finnur wrote: > LGTM (sorry, didn't see Devlin's hint about an OWNER; ...
6 years ago (2014-12-12 16:24:09 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/772983002/60001
6 years ago (2014-12-12 16:25:19 UTC) #24
commit-bot: I haz the power
Committed patchset #4 (id:60001)
6 years ago (2014-12-12 17:37:17 UTC) #25
commit-bot: I haz the power
6 years ago (2014-12-12 17:38:12 UTC) #26
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7ec6e063e36a66300570ab0adfd88c2e5acc6bd3
Cr-Commit-Position: refs/heads/master@{#308113}

Powered by Google App Engine
This is Rietveld 408576698